I am trying to create a role, after a user signed up successfully and it seems there is a callback o...
b
I am trying to create a role, after a user signed up successfully and it seems there is a callback option and it is documented here https://supertokens.com/docs/thirdparty/common-customizations/handling-signinup-success But when I add it, the
Copy code
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[])
requires to have a provider, Is it the same providers as e.g.
thirdpartyemailpassword.init()
. Is this then obsolete?
seems its not obsolete, when I remove
thirdpartyemailpassword.init()
the login is not possible anymore (e.g. Google)
but are the providers configuration the same for
Copy code
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[])
and
Copy code
thirdpartyemailpassword.init(providers=[])
?
seems to me
override_thirdparty_apis()
never gets called with a Google login based on the example above
mhm so when I remove
Copy code
thirdpartyemailpassword.init()
and only have
Copy code
thirdparty.init()
the auth uri does not exist anymore
Copy code
INFO:     172.20.0.1:54686 - "GET /auth/authorisationurl?thirdPartyId=google HTTP/1.1" 404 Not Found
r
The providers array that you give to the original implementation should come from the arguments of the function you define
You also need to use the same recipe on the frontend and backend
So thirdpartyemailpassword on both, if thirdparty on both
b
you mean the same or a reference?
r
Right. But the link in the issue you opened referred to thirdparty
b
or does
ThirdPartyEmailPassword.init()
in the frontend needs to be switched to
thirdparty.init()
?
r
No. Both need to be thirdpartyemailpassword
b
but how can I override the api for
thirdpartyemailpassword.init()
? in the backend? When I add
Copy code
override=thirdparty.InputOverrideConfig(
        apis=override_thirdparty_apis
      ),
like for
thirdparty.init()
then the app crashes (would need to check for the logs, but some functions were not existing)
😕
r
Well; you are looking at the wrong recipe docs
b
that might be 😄
r
You are looking at third party recipe docs but you should look at thirdpartyemailpassword
b
ahhh there are different
I expected it to be the same for each of the recipes
r
Yes.