Overview
Ship Mobile Fast comes with pre-built authentication flows using Expo’s SecureStore and your choice of authentication providers.
Features
Email/Password
Users can sign in with their email and password.
Social OAuth
We have Google and Apple OAuth support.
Magic Link
Sending a magic link to the user’s email address
Forgot Password
If your users forget their password, they can reset it.
Verify Email
Users can verify their email address in the app.
How to use?
Currently implemented and fully supported.
Auth Functions
Sign In With Email/Password
Sign In With Email/Password
To sign in with email/password, use the signIn
function.
Sign Up With Email/Password
Sign Up With Email/Password
To sign up with email/password, use the signUp
function.
Sign In With Google
Sign In With Google
To sign in with Google, use the signInWithGoogle
function.
Sign In With Apple
Sign In With Apple
To sign in with Apple, use the signInWithApple
function.
Create Session From URL
Create Session From URL
To create a session from a URL, use the createSessionFromUrl
function.
Magic happens here. Don’t change this.
Handle Show Password
Handle Show Password
To handle show password on the password input, use the handleShowPassword
function.
Error Handling
Error Handling
To handle errors, use the handleError
function.
Send New Password Link
Send New Password Link
To send a new password link, use the sendNewPasswordLink
function.
Set New Password
Set New Password
To set a new password, use the setNewPassword
function.
Sign Out
Sign Out
To sign out, use the signOut
function.
Send Magic Link
Send Magic Link
To send a magic link, use the sendMagicLink
function.
Props
Value | Type | Description | |
---|---|---|---|
user | UserMetaData | null | Contains current authenticated user information | |
session | Session | null | Contains active session information | |
initialized | boolean | Indicates if auth state has been initialized | |
signOut | () => Promise<void> | Signs out the current user | |
signIn | (email: string, password: string) => Promise<void> | Signs in user with email/password | |
signUp | (email: string, password: string) => Promise<void> | Creates a new user account | |
sendMagicLink | (email: string) => Promise<void> | Sends a magic link to user’s email | |
signInWithGoogle | () => Promise<void> | Initiates Google OAuth sign in | |
signInWithApple | () => Promise<void> | Initiates Apple OAuth sign in | |
createSessionFromUrl | (url: string) => Promise<void> | Creates session from URL | |
handleShowPassword | () => void | Toggles password visibility | |
isLoading | boolean | Indicates if auth operation is in progress | |
error | Error | null | Contains error information if any | |
isAuthenticated | boolean | Indicates if user is authenticated | |
showPassword | boolean | Controls password visibility state | |
handleError | `(error: AuthError | Error) => void` | Handles auth-related errors |
sendNewPasswordLink | (email: string) => Promise<void> | Sends password reset link | |
setNewPassword | (password: string) => Promise<void> | Sets new password |
Currently implemented and fully supported.
Auth Functions
Sign In With Email/Password
Sign In With Email/Password
To sign in with email/password, use the signIn
function.
Sign Up With Email/Password
Sign Up With Email/Password
To sign up with email/password, use the signUp
function.
Sign In With Google
Sign In With Google
To sign in with Google, use the signInWithGoogle
function.
Sign In With Apple
Sign In With Apple
To sign in with Apple, use the signInWithApple
function.
Create Session From URL
Create Session From URL
To create a session from a URL, use the createSessionFromUrl
function.
Magic happens here. Don’t change this.
Handle Show Password
Handle Show Password
To handle show password on the password input, use the handleShowPassword
function.
Error Handling
Error Handling
To handle errors, use the handleError
function.
Send New Password Link
Send New Password Link
To send a new password link, use the sendNewPasswordLink
function.
Set New Password
Set New Password
To set a new password, use the setNewPassword
function.
Sign Out
Sign Out
To sign out, use the signOut
function.
Send Magic Link
Send Magic Link
To send a magic link, use the sendMagicLink
function.
Props
Value | Type | Description | |
---|---|---|---|
user | UserMetaData | null | Contains current authenticated user information | |
session | Session | null | Contains active session information | |
initialized | boolean | Indicates if auth state has been initialized | |
signOut | () => Promise<void> | Signs out the current user | |
signIn | (email: string, password: string) => Promise<void> | Signs in user with email/password | |
signUp | (email: string, password: string) => Promise<void> | Creates a new user account | |
sendMagicLink | (email: string) => Promise<void> | Sends a magic link to user’s email | |
signInWithGoogle | () => Promise<void> | Initiates Google OAuth sign in | |
signInWithApple | () => Promise<void> | Initiates Apple OAuth sign in | |
createSessionFromUrl | (url: string) => Promise<void> | Creates session from URL | |
handleShowPassword | () => void | Toggles password visibility | |
isLoading | boolean | Indicates if auth operation is in progress | |
error | Error | null | Contains error information if any | |
isAuthenticated | boolean | Indicates if user is authenticated | |
showPassword | boolean | Controls password visibility state | |
handleError | `(error: AuthError | Error) => void` | Handles auth-related errors |
sendNewPasswordLink | (email: string) => Promise<void> | Sends password reset link | |
setNewPassword | (password: string) => Promise<void> | Sets new password |
Coming soon.