I noticed that the Auth0 external id (`sub`) for the google provider was `google-oauth2|<ID>`. Now ...
n
I noticed that the Auth0 external id (
sub
) for the google provider was
google-oauth2|<ID>
. Now with supertokens I am building this within
createNewSession
, for mapping the accounts.
Copy code
const externalUserId = user.thirdParty ? `${user.thirdParty.id}|${user.thirdParty.userId}` : null;
I noticed that
user.thirdParty.id
, here is
google
and not
google-oauth2
. Is it safe for me to simply replace the
google|
part with
google-oauth2
, is the
<ID>
part of the auth0 sub stable?
r
hey! yes it is fine to do that. But out of curiosity, why do you want to maintain that format? Is the logic in your application API relying on this type of format? Finally, we have a userID mapping feature as well which you can use to map supertokens userID to an externalUserId which is generally a better approach
we actually dont use it after the account re-creation/association
it is just to have the mapping in our database for now
r
ahh i see
n
I am already looking forward when I can delete everything auth0 related from the codebase
7 Views