Classic login via username/email and password

This authentication method allows your application’s users to log in with their username or email.

During sign-up, users have to specify an email address, even if you use usernames for authentication. Email addresses are used to confirm sign-ups and reset passwords.

To implement username/email and password authentication:

  1. In the application UI, add the following elements:
    • user sign-up form
    • a request form to resend a sign-up confirmation email
    • login form
    • password reset form

  1. Implement authentication logic using the following SDK methods:

    • registerNewUser — creates a new user account in the application and sends a sign-up confirmation email to the specified email address. To complete registration, the user must follow the link from the email.
    • resendAccountConfirmationEmail — resends a sign-up confirmation email to the specified email address. To complete registration, the user must follow the link from the email.
    • authByUsernameAndPassword — logs the user in the application using the specified username/email and password.
    • resetPassword — resets the user’s current password and sends an email to change the password to the email address specified during sign-up.

Note

You can configure the URL to which the user will be redirected after successful authorization, email confirmation, or password reset in the Login project settings of Publisher Account (Security > OAuth 2.0 > OAuth 2.0 redirect URIs).

You can customize emails for users in Publisher Account if you use custom storage or Xsolla storage for user data.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!

Useful links

Last updated: August 30, 2022

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!