Magic Link via Mobile SDKs
A magic link is a single-use link sent to the user for authentication (sign-up or sign-in) that validates their identity. The Descope service can send magic links via email or SMS texts.
The browser tab that is opened after clicking the magic link gets the authenticated session cookies. For example, consider a user that starts the login process on a laptop browser and gets a magic link delivered to their email inbox. When they click the email link, a new browser tab will open and they will be logged in on the new tab.

Alert
Consider using magic links when your users typically use only one device to access your application, and when opening new tabs is not a big inconvenience.
Use Cases
- New user signup: The following actions must be completed, first User Sign-Up then User Verification
- Existing user signin: The following actions must be completed, first User Sign-In then User Verification
- Sign-Up or Sign-In (Signs up a new user or signs in an existing user): The following actions must be completed, first User Sign-Up or Sign-In then User Verification
Client SDK
Install SDK
// 1. Within XCode, go to File > Add Packages
// 2. Search for the URL of the git repo: https://github.com/descope/descope-swift
// 3. Configure your desired dependency rule
// 4. Click Add Package// 1. Within Android Studio, go to File > Project Structure > Dependencies > Add Dependency > 1 Library Dependency
// 2. Search for the dependency: "com.descope"
// 3. Configure your desired dependency rules
// 4. Click "Ok"// 1. From your Flutter project directory root, install the Descope SDK by running: flutter pub add descope
// 2. Or, add Descope to your pubspec.yml by including this line: descope: ^0.9.0
// View the package on pub.dev: https://pub.dev/packages/descope// 1. From your React Native project directory root, install the Descope SDK by running: npm i @descope/react-native-sdk
// View the package: https://github.com/descope/descope-react-nativeImport and initialize SDK
import DescopeKit
import AuthenticationServices
do {
Descope.setup(projectId: "__ProjectID__") { config in
// Optional: Only set baseURL if using a custom domain with Descope and managing token response with cookies
config.baseURL = "https://auth.app.example.com"
}
print("Successfully initialized Descope")
} catch {
print("Failed to initialize Descope")
print(error)
}import android.app.Application
import com.descope.Descope
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
try {
Descope.setup(this, projectId = "__ProjectID__") {
// Optional: Only set baseURL if using a custom domain with Descope and managing token response with cookies
baseUrl = "https://auth.app.example.com"
// Enable the logger
if (BuildConfig.DEBUG) {
logger = DescopeLogger()
}
}
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
}
}
}import 'package:descope/descope.dart';
// Where your application state is being created
Descope.setup('<Your-Project-Id>', (config) {
// Optional: Only set baseURL if using a custom domain with Descope and managing token response with cookies
config.baseUrl = 'https://auth.app.example.com';
});
await Descope.sessionManager.loadSession();import { AuthProvider } from '@descope/react-native-sdk'
const AppRoot = () => {
return (
<AuthProvider
projectId="__ProjectID__"
// Optional: Only set baseURL if using a custom domain with Descope and managing token response with cookies
baseUrl = "https://auth.app.example.com"
>
<App />
</AuthProvider>
)
}User Sign-Up
For registering a new user, your application should accept user information, including an email or
phone number used for verification. In this sample code, the magic-link will be sent by email to email@company.com.
To change the delivery method to send the magic-link as a text, you would change the deliveryMethod to sms within the below example.
Also note that signup is not complete without the user verification step below.
// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
let deliveryMethod = DeliveryMethod.email
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
let loginId = "email@company.com"
// user: Optional user object to populate new user information.
let user = User("name": "Joe Person", "phone": "+15555555555", "email": "email@company.com")
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
let uri = "http://auth.company.com/api/verify_magiclink"
do {
try await Descope.magicLink.signUp(with: deliveryMethod, loginId: loginId, user: user, uri: uri)
print("Successfully initiated Magic Link Sign Up")
} catch {
print("Failed to initiate Magic Link Sign Up")
print(error)
}// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
// user: Optional user object to populate new user information.
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
// details: Optional object to populate new user information.
try {
Descope.magicLink.signUp(
method = DeliveryMethod.Email,
loginId = "email@company.com",
// Optional object to populate new user information.
details = SignUpDetails(
name = "firstName lastName",
email = "email@company.com",
phone = "+15555555555",
givenName = "firstName",
middleName = "middleName",
familyName = "lastName"
)
)
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
}// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
const deliveryMethod = DeliveryMethod.email;
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
const loginId = 'email@company.com';
// user: Optional user object to populate new user information.
final details = SignUpDetails(name: "Joe Person");
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink";
Descope.magicLink.signUp(
method: deliveryMethod, loginId: loginId, details: details, uri: uri);// Args:
// user: Optional user object to populate new user information.
const user = {"name": "Joe Person", "phone": "+15555555555", "email": "email@company.com"}
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
const loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink"
// deliveryMethod: Delivery method to use to send magic-link. Supported values include "email" or "sms"
const deliveryMethod = "email"
// signUpOptions (SignUpOptions): this allows you to configure behavior during the authentication process.
const signUpOptions = {
"customClaims": {"claim": "Value1"},
"templateOptions": {"option": "Value1"}
}
const descopeSdk = useDescope();
const resp = await descopeSdk.magicLink.signUp[deliveryMethod](loginId, uri, user, signUpOptions);
if (!resp.ok) {
console.log("Failed to initialize signup flow")
console.log("Status Code: " + resp.code)
console.log("Error Code: " + resp.error.errorCode)
console.log("Error Description: " + resp.error.errorDescription)
console.log("Error Message: " + resp.error.errorMessage)
}
else {
console.log("Successfully initialized signup flow")
}User Sign-In
For authenticating a user, your application should accept the user's identity (typically an email address
or phone number). In this sample code, the magic-link will be sent by email to email@company.com.
Also note that signin is not complete without the user verification step below.
// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
let deliveryMethod = DeliveryMethod.email
// loginId: email or phone - the loginId of the user
let loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
let uri = "http://auth.company.com/api/verify_magiclink"
guard let session = Descope.sessionManager.session else { return }
var signInOptions: [SignInOptions] = [
.customClaims(["name": "{{user.name}}"]),
.mfa(refreshJwt: session.refreshJwt),
.stepup(refreshJwt: session.refreshJwt)
]
do {
try await Descope.magicLink.signIn(with: deliveryMethod, loginId: loginId, uri: uri, options: signInOptions)
print("Successfully initiated Magic Link Sign In")
} catch {
print("Failed to initiate Magic Link Sign In")
print(error)
}// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
// loginId: email or phone - the loginId of the user
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
// options: optional options to get attributes like custom claims, stepup, mfa, and revoke sessions in response
try {
Descope.magicLink.signIn(
method = DeliveryMethod.Email,
loginId = "email@company.com",
options = listOf(
SignInOptions.CustomClaims(mapOf("cc1" to "yes", "cc2" to true)),
SignInOptions.StepUp(session.refreshJwt),
SignInOptions.Mfa(session.refreshJwt),
SignInOptions.RevokeOtherSessions
)
)
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
}// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
const deliveryMethod = DeliveryMethod.email;
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
const loginId = 'email@company.com';
// options: Optional options to get custom claims in response
const options = SignInOptions(customClaims: {'name': '{{user.name}}'});
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink";
Descope.magicLink.signIn(
method: deliveryMethod, loginId: loginId, options: options, uri: uri);// Args:
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
const loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink"
// deliveryMethod: Delivery method to use to send magic-link. Supported values include "email" or "sms"
const deliveryMethod = "email"
// loginOptions (LoginOptions): this allows you to configure behavior during the authentication process.
const loginOptions = {
"stepup": false,
"mfa": false,
"customClaims": {"claim": "Value1"},
"templateOptions": {"option": "Value1"}
}
// refreshToken (optional): the user's current refresh token in the event of stepup/mfa
const descopeSdk = useDescope();
const resp = await descopeSdk.magicLink.signIn[deliveryMethod](loginId, uri, loginOptions);
if (!resp.ok) {
console.log("Failed to initialize signin flow")
console.log("Status Code: " + resp.code)
console.log("Error Code: " + resp.error.errorCode)
console.log("Error Description: " + resp.error.errorDescription)
console.log("Error Message: " + resp.error.errorMessage)
}
else {
console.log("Successfully initialized signin flow")
}User Sign-Up or Sign-In
For signing up a new user or signing in an existing user, you can utilize the signUpOrIn functionality.
Only user loginId is necessary for this function. In this sample code, the magic-link will be
sent by email to email@company.com. To change the delivery method to send the magic-link as a text, you would
change the deliveryMethod to sms within the below example.
Note that signUpOrIn is not complete without the user verification step below.
// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
let deliveryMethod = DeliveryMethod.email
// loginId: email or phone - email or phone - the loginId of the user
let loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
let uri = "http://auth.company.com/api/verify_magiclink"
guard let session = Descope.sessionManager.session else { return }
var signInOptions: [SignInOptions] = [
.customClaims(["name": "{{user.name}}"]),
.mfa(refreshJwt: session.refreshJwt),
.stepup(refreshJwt: session.refreshJwt)
]
do {
try await Descope.magicLink.signUpOrIn(with: deliveryMethod, loginId: loginId, uri: uri, options: signInOptions)
print("Successfully initiated Magic Link Sign Up or In")
} catch {
print("Failed to initiate Magic Link Sign Up or In")
print(error)
}// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
// loginId: email or phone - email or phone - the loginId of the user
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
// options: optional options to get attributes like custom claims, stepup, mfa, and revoke sessions in response
try {
Descope.magicLink.signUpOrIn(
method = DeliveryMethod.Email,
loginId = "email@company.com",
options = listOf(
SignInOptions.CustomClaims(mapOf("cc1" to "yes", "cc2" to true)),
SignInOptions.StepUp(session.refreshJwt),
SignInOptions.Mfa(session.refreshJwt),
SignInOptions.RevokeOtherSessions
)
)
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
}// Args:
// deliveryMethod: Delivery method to use to send magic link. Supported values include DeliveryMethod.email or DeliveryMethod.sms
const deliveryMethod = DeliveryMethod.email;
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
const loginId = 'email@company.com';
// options: Optional options to get custom claims in response
const options = SignInOptions(customClaims: {'name': '{{user.name}}'});
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink";
Descope.magicLink.signUpOrIn(
method: deliveryMethod, loginId: loginId, options: options, uri: uri);// Args:
// loginId: email or phone - becomes the loginId for the user from here on and also used for delivery
const loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink"
// deliveryMethod: Delivery method to use to send magic-link. Supported values include "email" or "sms"
const deliveryMethod = "email"
// signUpOptions (SignUpOptions): this allows you to configure behavior during the authentication process.
const signUpOptions = {
"customClaims": {"claim": "Value1"},
"templateOptions": {"option": "Value1"}
}
const descopeSdk = useDescope();
const resp = await descopeSdk.magicLink.signUpOrIn[deliveryMethod](loginId, uri, signUpOptions);
if (!resp.ok) {
console.log("Failed to initialize signUpOrIn flow")
console.log("Status Code: " + resp.code)
console.log("Error Code: " + resp.error.errorCode)
console.log("Error Description: " + resp.error.errorDescription)
console.log("Error Message: " + resp.error.errorMessage)
}
else {
console.log("Successfully initialized signUpOrIn flow")
}User Verification
Once a user clicks the magic-link, your application must call the verify function. This means that this function needs to be called
from your application when the user clicks the magiclink. The function call will return all the the necessary JWT tokens and claims
and user information in the resp dictionary. The sessionJwt within the resp is needed for session validation.
// Args:
// token: URL parameter containing the magic link token for example, http://auth.company.com/api/verify_magiclink?t=token.
let token = "xxxx"
do {
let descopeSession = try await Descope.magicLink.verify(token: token)
print("Successfully verified Magic Link Token")
print(descopeSession as Any)
} catch {
print("Failed to verify Magic Link Token")
print(error)
}// Args:
// token: URL parameter containing the magic link token for example, http://auth.company.com/api/verify_magiclink?t=token.
// loginId: email or phone - the loginId of the user
// method: delivery method of magic link
try {
val authResponse = Descope.magicLink.verify(
method = DeliveryMethod.Email,
loginId = "email@company.com",
code = "<code>"
)
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
} // To verify a magic link, your redirect page must call the validation function on the token (t) parameter (https://your-redirect-address.com/verify?t=<token>):
// Args:
// token: URL parameter containing the magic link token for example, http://auth.company.com/api/verify_magiclink?t=token.
const token = 'http://auth.company.com/api/verify_magiclink?t=token';
final authResponse = await Descope.magicLink.verify(token: token);// Args:
// token: URL parameter containing the magic link token for example, http://auth.company.com/api/verify_magiclink?t=token.
const token = "xxxx"
const descopeSdk = useDescope();
const resp = await descopeSdk.magicLink.verify(token)
if (!resp.ok) {
console.log("Failed to verify magic link token")
console.log("Status Code: " + resp.code)
console.log("Error Code: " + resp.error.errorCode)
console.log("Error Description: " + resp.error.errorDescription)
console.log("Error Message: " + resp.error.errorMessage)
}
else {
console.log("Successfully verified magic link token")
}Update Email
The Descope SDK allows for you to update user's email address. With this function, you will pass the user's loginId and the new email
address you want associated to the user. In order to verify the email address, the magic link will be sent via the email delivery
method. Once the update email function has been called, you will need to verify the token before the email address will be updated.
// Args:
// email: the new email address you want to associate with the user
let email = "newEmail@company.com"
// loginId: email or phone - the loginId of the user
let loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
let uri = "http://auth.company.com/api/verify_magiclink"
// refreshJwt: The refreshJwt of the user to be updated
let refreshJwt = "xxxxxx"
do {
try await Descope.magicLink.updateEmail(email, loginId: loginId, uri: uri, refreshJwt: refreshJwt)
print("Successfully initiated Magic Link Email Update")
} catch {
print("Failed to initiate Magic Link Email Update")
print(error)
}// Args:
// email: the new email address you want to associate with the user
// loginId: email or phone - the loginId of the user
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
// refreshJwt: The refreshJwt of the user to be updated
// options: optional options for loginId and merging behavior
try {
Descope.magicLink.updateEmail(
email = "email2@gompany.com",
loginId = "email@company.com",
uri = "<uri>",
refreshJwt = "<refreshJwt>"
options = UpdateOptions(
addToLoginIds = true,
onMergeUseExisting = true
)
)
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
}// Args:
// email: the new email address you want to associate with the user
const email = "newEmail@company.com";
// loginId: email or phone - the loginId of the user
const loginId = "email@company.com";
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink";
// refreshJwt: The refreshJwt of the user to be updated
const refreshJwt = "xxxxxx";
/// You can optionally pass the [options] parameter to add the new phone number
/// as a `loginId` for the existing user, and to determine how to resolve conflicts
/// if another user already exists with the same `loginId`. Check out the
// Update Options (https://github.com/descope/descope-flutter/blob/main/lib/src/types/others.dart) type for more details.
final options = UpdateOptions(
addToLoginIds: true,
onMergeUseExisting: true
);
Descope.magicLink.updateEmail(
loginId: loginId, email: email, uri: uri, refreshJwt: refreshJwt, options: options);// Args:
// loginId (str): The loginId of the user being updated
const loginId = "email@company.com"
// email (str): The new email address. If an email address already exists for this end user, it will be overwritten
const email = "newEmail@company.com"
// refreshToken (str): The session's refresh token (used for verification)
const refreshToken = "xxxxx"
// updateOptions (UpdateOptions): this allows you to configure behavior during the authentication process.
const updateOptions = {
"addToLoginIDs": true,
"onMergeUseExisting": true,
"templateOptions": {"option": "Value1"}
}
const descopeSdk = useDescope();
const resp = await descopeSdk.magicLink.update.email(loginId, email, refreshToken, updateOptions);
if (!resp.ok) {
console.log("Failed to start magic link email update")
console.log("Status Code: " + resp.code)
console.log("Error Code: " + resp.error.errorCode)
console.log("Error Description: " + resp.error.errorDescription)
console.log("Error Message: " + resp.error.errorMessage)
}
else {
console.log("Successfully started magic link email update")
console.log(resp.data)
}Update Phone
The Descope SDK allows for you to update user's phone number. With this function, you will pass the user's loginId and the new
phone number you want associated to the user. In order to verify the phone number, the magic link will be sent via the sms delivery
method. Once the update phone function has been called, you will need to verify the token before the phone
number will be updated.
// Args:
// phone: the new phone number you want to associate with the user
let phone = "+12222222222"
// loginId: email or phone - the loginId of the user
let loginId = "email@company.com"
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
let uri = "http://auth.company.com/api/verify_magiclink"
// refreshJwt: The refreshJwt of the user to be updated
let refreshJwt = "xxxxxx"
do {
try await Descope.magicLink.updatePhone(phone, with: .sms, loginId: loginId, uri: uri, refreshJwt: refreshJwt)
print("Successfully started Magic Link Phone Update")
} catch {
print("Failed to initiate Magic Link Phone Update")
print(error)
}// Args:
// phone: the new phone number you want to associate with the user
// loginId: email or phone - the loginId of the user
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
// refreshJwt: The refreshJwt of the user to be updated
// method: the delivery modality of the link
// options: optional options for loginId and merging behavior
try {
Descope.magicLink.updatePhone(
phone = "+11231231234",
method = "sms",
uri = "<uri>",
loginId = "email@company.com",
refreshJwt = "<refreshJwt>"
options = UpdateOptions(
addToLoginIds = true,
onMergeUseExisting = true
)
)
} catch (e: Exception) {
Log.e("ERROR", e.stackTraceToString())
}// Args:
// phone: the new phone number you want to associate with the user
const phone = "+12222222222";
// loginId: email or phone - the loginId of the user
const loginId = "email@company.com";
// uri: (Optional) this is the link that user is sent (code appended) for verification. Your application needs to host this page and extract the token for verification. The token arrives as a query parameter named 't'
const uri = "http://auth.company.com/api/verify_magiclink";
// refreshJwt: The refreshJwt of the user to be updated
final refreshJwt = "xxxxxx";
// method: the delivery modality of the link
const method = DeliveryMethod.email;
/// You can optionally pass the [options] parameter to add the new phone number
/// as a `loginId` for the existing user, and to determine how to resolve conflicts
/// if another user already exists with the same `loginId`. Check out the
// Update Options (https://github.com/descope/descope-flutter/blob/main/lib/src/types/others.dart) type for more details.
final options = UpdateOptions(
addToLoginIds: true,
onMergeUseExisting: true
);
Descope.magicLink.updatePhone(
loginId: loginId,
method: method,
phone: phone,
uri: uri,
refreshJwt: refreshJwt,
options: options);// Args:
// deliveryMethod: Delivery method to use to send magic link.
const deliveryMethod = "sms"
// loginId (str): The loginId of the user being updated
const loginId = "phone@company.com"
// phone (str): The new phone number. If a phone number already exists for this end user, it will be overwritten
const phone = "+12223334455"
// refreshToken (str): The session's refresh token (used for verification)
const refreshToken = "xxxxx"
// updateOptions (UpdateOptions): this allows you to configure behavior during the authentication process.
const updateOptions = {
"addToLoginIDs": true,
"onMergeUseExisting": true,
"templateOptions": {"option": "Value1"}
}
const descopeSdk = useDescope();
const resp = await useDescope.magicLink.update.phone(deliveryMethod, loginId, phone, refreshToken, updateOptions);
if (!resp.ok) {
console.log("Failed to start magic link phone update")
console.log("Status Code: " + resp.code)
console.log("Error Code: " + resp.error.errorCode)
console.log("Error Description: " + resp.error.errorDescription)
console.log("Error Message: " + resp.error.errorMessage)
}
else {
console.log("Successfully started magic link phone update")
console.log(resp.data)
}Session Validation
The final step of completing the authentication with Descope is to validate the user session. Descope provides rich session management capabilities, including configurable session timeouts and logout functions. You can find the details and sample code for client session validation here.
Checkpoint
Your application is now integrated with Descope. Please test with sign-up or sign-in use case.