Dear Supertokens support,
We are using React + Next.js. Question - is it possible to sign in using Supertokens without rendering a corresponding form? F.x. using a function, something like
signIn(email, password)
called from within a component. Similarly to how you can use the
signOut()
function?
Thanks a lot,
BR,
Yuriy
r
rp_st
06/22/2022, 2:10 PM
Hey @yuriy.kurylenko. Yes that is possible. Just done render our components on your app’s render function. Each recipe has several functions exposed that you can use in your UI. For example, there is EmailPassword.signIn(..) and so on
rp_st
06/22/2022, 2:11 PM
The docs for this are a little lacking, so feel free to ask questions
y
yuriy.kurylenko
06/22/2022, 3:26 PM
Thanks a lot, @rp_st! Do you maybe have a code snippet I can look at when it comes to using
EmailPassword.signIn()
from
React
? Implying that we have f.x. our own form for signing in.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).