Hey folks - We're currently building out a migrat...
# support-questions
n
Hey folks - We're currently building out a migration away from cognito (which - does not allow user exports), so we need to do a slow migration towards supertokens. Current thinking is to use ThirdPartyEmailPassword.emailPasswordSignInPOST, and if the login with supertokens fails, try to login with the old auth provider. If this succeeds - we want to create the user in supertokens with their user/password, bypass email verification, etc. Havent been able to find in the docs thus far where we can pass the user/pass along for creation, mind pointing me in the right direction?
r
Hey @nabb23 we actually had docs for this a while back but removed them cause export users is just way easier
Hey @nabb23
n
ThirdPartyEmailPassword
it highlights how you would go about migrating from auth0 to supertokens in the way that you mentioned (without user export)
something similar would apply for cognito to supertokens
n
Thanks! Will take a look and come back if any questions
r
Sounds good
n
This was really helpful - one thing thats missing is verifying the email and skipping the email verification, seems to be possible? https://supertokens.com/docs/thirdpartyemailpassword/migration/account-creation/email-verification I've tried chaining straight into the signin function like so:
Copy code
if (legacyLoginResult.status === 'success') {
    await this.emailPasswordSignUp(input);
    return originalImplementation.emailPasswordSignIn(input);
}
r
you don't really need to call the signIn function after callling signUp.
and yes, after you call signUp, you can mark the email as verified as well
if it's verified in cognito
n
Is there a readily available function for that in the sdk? Or need to make the http calls?
r
There is a function for that
I think you need to call the function to generate the email verification token first, and then call the verify email using token function
It’s in the email verification recipe
n
Got it working - did not expect to be able to call the recipe directly from within the other one but it works! thanks again