SDK pour Unity / Connexion sans mot de passe
  Retour à la documentation

SDK pour Unity

Connexion sans mot de passe

Users can use a one-time code instead of a password or follow a one-time link to authenticate in the application. The code or link can be sent via SMS or email and expires after 3 minutes.

The first time a user logs into your application without a password, a new account is created automatically. You don’t have to implement additional logic for user sign-up.

Note
In Publisher Account, the Passwordless login option must be selected for the Login project that you use in your application. You can change the login method later by clicking the Change Login method link. Previously saved settings will not be lost.

To implement passwordless login:

  1. Set up the Login project:
    1. Open your project in Publisher Account.
    2. In the side menu, сlick Login.
    3. Click Configure in the Login project pane.
    4. Go to Passwordless login > Settings and select the type of passwordless authentication method that you want to use.
    5. To send a one-time link with the code, go to the Email settings tab and set the Log in via magic link toggle to On.
    6. Click Save changes.

  1. In the application UI, add the following elements:
    • form to enter a phone number and/or email
    • form to enter a one-time code
  1. Implement passwordless authentication logic using the following SDK methods:
    • StartAuthByPhoneNumber — starts user authentication and sends an SMS with a one-time code and a link to the specified phone number (if login via magic link is configured for the Login project).
    • CompleteAuthByPhoneNumber — completes authentication after the user enters a one-time code or follows a link received by SMS.
    • StartAuthByEmail — starts user authentication and sends an email with a one-time code and a link to the specified email address (if login via magic link is configured for the Login project).
    • CompleteAuthByEmail — completes authentication after the user enters a one-time code or follows a link received in an email.
    • OAuthLogout — ends the active user session.
Cet article vous a été utile ?
Merci !
Que pouvons-nous améliorer ? Message
Nous sommes désolés de l'apprendre
Dites-nous pourquoi vous n'avez pas trouvé cet article utile. Message
Merci pour votre commentaire !
Nous examinerons votre message et l'utiliserons pour améliorer votre expérience.
Évaluer cette page
Évaluer cette page
Que pouvons-nous améliorer ?

Préfère ne pas répondre

Merci pour votre commentaire !

Liens utiles

Dernière mise à jour: 10 Octobre 2023

Faute de frappe ou autre erreur dans le texte ? Sélectionnez le texte concerné et appuyez sur Ctrl+Entée.

Signaler un problème
Nous améliorons continuellement notre contenu grâce à vos commentaires.
Indiquez votre adresse e-mail pour un suivi
Merci pour votre commentaire !