https://supertokens.com/ logo
multi login
d

derSuchende

04/22/2023, 6:58 AM
Hi, how can I implement a selectable multi method login? Is it possible? Thank you.
r

rp

04/22/2023, 7:01 AM
hey @derSuchende can you elaborate?
d

derSuchende

04/22/2023, 7:16 AM
Yes, I would create a welcome page with a list of possible login methods (phone with OTP, phone & password, email & password, etc.) and then when the uesr select a method I redirect him to the appropriate login page...
r

rp

04/22/2023, 7:32 AM
Yes. That’s possible. The list of login methods would have to be a custom UI, but other than that, you can always show the right login method based on the rid query param in the auth page.
You even have the option to embed our login components in your own react component, so that would allow you more flexibility
Keep in mind though that logging in via different login methods yields a different user id. If you want to merge accounts across login methods, you will need the account linking feature which we are working on
d

derSuchende

04/22/2023, 7:38 AM
What is the rid query param?
r

rp

04/22/2023, 7:38 AM
It’s the query param on the url which tells supertokens which login method to show
If the value of it is emailpassword, it will show the emailpassword ui
If the value of it is passwordless, it will show the passwordless ui and so on
d

derSuchende

04/22/2023, 7:39 AM
Ok, thank you
r

rp

04/22/2023, 7:39 AM
Thats only applicable if you aren’t embedding the components in your own component
d

derSuchende

04/22/2023, 7:39 AM
Rigth