Set up authentication methods in Kinde
Auth and access
You can let users choose a password or a one-time passcode (OTP) in the same sign-in flow. This is useful when a user has forgotten their password but does not want to reset it, or when you want to reduce password friction without moving the app fully to passwordless. To do this:
Enable a password connection first, then turn on the code option on that connection. Use one or both of these connections for your application:
Skip this step if you already have a password connection enabled for your application.
Sign in to your Kinde dashboard.
Select View details on the relevant application, or go to Settings > Environment > Applications and select View details.
Select the Authentication menu.
Enable one or both of the password connections for the app (Email connections > Password or Username connections > Password).
Now, to also enable a passwordless one-time passcode alongside the password connection, do the following:
In Kinde, go to Settings > Environment > Authentication.
In the Password section, select Configure on the relevant tile: Email connections > Password or Username connections > Password. A configuration window opens.
In the Settings section, switch on Show ‘Sign in with a code’ on password page.
Select Save.
Repeat for the other password connection if you want the option on both.
The setting lives on the connection, not on the application. If several applications share the Email + password or Username + password connection, switching this on affects all of them.
Some connection options are properties of the connection itself rather than of the organization. If an organization uses a shared password connection, the option follows whatever is set on that shared connection. You cannot switch it on for one organization and off for another while both use the same connection. See Set custom authentication per organization.
When the option is switched on, the user sees an Or separator and a Sign in with a code button below the password field during sign-in.
The user can choose to sign in with either their password or a one-time passcode.
When the user signs in with a one-time passcode, their password is not changed or removed. They can continue to sign in with their password the next time.
You can change the wording of both the separator and the button.
In Kinde, go to Design > Page content.
Select the Verify password page from the dropdown menu.
Scroll down and edit the following fields:
Or)Sign in with a code)Select Save.
Changes take effect immediately. You do not need to redeploy your application.
The next time a user opens the sign-in page, they see the updated labels:
See Update page content.
| Sign-in identity | Where Kinde sends the code |
|---|---|
| Email + password | The email address the user entered to sign in |
| Username | The verified email address on the user’s Kinde profile |
Kinde only ever sends the code to an email address that is already verified on the account. It never sends the code to an address supplied in the sign-in request, such as through login_hint.
The passcode behaves exactly like any other Kinde one-time passcode. It expires after 2 hours, and attack protection limits on sign-in attempts still apply. See Passwordless authentication for more about how Kinde issues codes.
The Sign in with a code button is hidden and the code flow is refused in these cases:
A user needs a verified email address to receive a code. If they do not have one, Kinde still shows the code entry screen but does not send a code. The user cannot complete sign-in this way and should use their password.
This is intentional. Showing the same screen regardless of whether an account exists or has a verified email means an attacker cannot use the button to determine which accounts are real. It is the same protection described under attack protection. If a user reports that no code arrived, check that they have a verified email identity on their profile. See Identity and verification.
Signing in with a code does not skip any other step in your sign-in flow. If the user is required to complete multi-factor authentication, select an organization, or complete a required profile step, they are still prompted after entering the code.