Nhost supports a variety of sign-in methods:
To sign in a user with email and password, the user must first sign up:
If you've turned on email verification in your app's login settings, a user will be sent a verification email upon signup. The user must click the verification link in the email before they can log in.
Once a user has been signed up (and optionally verified), you can sign them in:
Users can sign in with passwordless email, also called magic link.
When a user signs in with passwordless email, Nhost will create the user if they don't already exist and send an email to the user.
When a user clicks the link in the email, they will be redirected to your app and automatically signed in.
Users can sign in with passwordless SMS. The passwordless SMS sign in method has a flow:
First, "sign in" the user with a phone number.
This will create the user if the user does not already exist, and send a One Time Password (OTP) to the user's
Use the OTP to finalize the sign-in:
A user can be created anonymously. This is useful for offering a limited version of your application to your users without having them sign in first.
An anonymous user gets a user ID with the
role. This role can be used to set permissions in Hasura
Anonymous users can be converted to "normal" users by deanonymize the user.