Hello Team, I'm currently in the process of migrating users from a Firebase project that utilizes b...
f
Hello Team, I'm currently in the process of migrating users from a Firebase project that utilizes both social and** password-based** logins to Supertokens, which primarily uses Social and Passwordless logins. The new workflow involves user authentication by Supertokens, followed by the transfer of the received token to MongoDB for verification using a JWK URI. Subsequently, a new user account is created within the MongoDB Atlas Authentication system. I'm seeking advice on how to effectively migrate these social and password-based users. I'm aware that the
recipe/user/passwordhash/import
method can be utilized to migrate Firebase users. However, the destination project is configured for Passwordless logins. Also, the
recipe/signinup
method, which can be used to import social users, does not provide access tokens. This presents a challenge as MongoDB Atlas lacks an admin API for creating users with Custom JWT. Therefore, creating a user in MongoDB requires a valid access token from Supertokens. Your guidance and insights on this migration process would be greatly appreciated.
r
hey @farhadk
the
recipe/user/passwordhash/import
API is not really relevant to you since you want to use passwordless and third party. This API is for email password password hash importing which won't be needed for passwordless. About creating an access token, you can do that by calling the cretae new session endpoint of the core using the user ID: https://app.swaggerhub.com/apis/supertokens/CDI/4.0.1#/Session%20Recipe/createNewSession to get back the access token
make sure to set
useDynamicSigningKey
to
true
in the API
f
Thank you very much.
5 Views