The question I've always been afraid to ask: Is there a way to do the Social Provider stuff for people who don't have JS working in their browsers?
I was under the assumption that the Social Provider logins redirect you to the provider, have you login, and then redirect you back to the app with the authentication information in the URL or something. Is that correct? And if that is correct, would the backend be able to just read the data from the URL and pass it to a
supertokens-node
method to do the login? Like
ThirdPartyEmailPassword.thirdPartySignInUp()
? And thus allow someone without JS to signin/signup?
r
rp_st
06/20/2023, 4:40 PM
hey @ITEnthusiasm the
thirdPartySignInUp
function needs to be called from the frontend to backend since this API call also creates a session for the user.
rp_st
06/20/2023, 4:41 PM
so this would require JS on the browser to be enabled
rp_st
06/20/2023, 4:41 PM
However, if you want it to work without JS, you can setup the redirection to point to your backend API and then make that call the signin up endpoint (within the backend itself), and then have the session set as cookies.
Right. So that can be called from the backend, but you will have to do the auth code exchange yourself before (in order to get the user’s id and email)
rp_st
06/20/2023, 5:45 PM
If you don’t want to do that yourself, then you will need to call the signinup API from the frontend which is what I was referring to
i
ITEnthusiasm
06/20/2023, 5:48 PM
Ah, mkay. I'll look into this (and potentially ask more questions later 😅). Thank you 🙏🏿
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).