Hello, I hope you are having a good day.
I have a question about the recipe "Email password + Social Login":
When doing a registration/login with google, for example, I need to send some parameter to the backend sdk to differentiate what type of user it is (doctor, patient).
I tried some solutions like using getAuthorisationURLWithQueryParamsAndSetState and trying to embed this differentiator parameter in the userContext attribute, but nothing worked.
From already thank you very much.
r
rp_st
03/17/2023, 5:42 AM
hey @EduBanegas
rp_st
03/17/2023, 5:42 AM
you need to use the pre API hook to modify the request when the signinup API is being called from the frontend.
Then on the backend, you can override that API and access the request object and read the custom input./
e
EduBanegas
03/17/2023, 2:00 PM
Thank you very much for the help, I was able to solve it by implementing the above.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).