Enterprise-level SDK for Unity / Xsolla Login widget
  Back to Docs

Enterprise-level SDK for Unity

Xsolla Login widget

Xsolla Login widget allows you to integrate a ready-made interface for user authentication into your project and reduce the cost of development for code and UI.

Restrictions:

  • The widget only supports the following user authentication methods:
    • classic login via username/email and password
    • passwordless login via a one-time code or link sent via SMS or email
    • web-based authentication via social networks
  • The widget doesn’t work in an external browser. For security reasons, external browsers restrict URLs from third-party applications.
  • The widget is not suitable for WebGL builds with iframes due to redirect restrictions.

Set up redirecting users to the application after successful authentication using the widget:

  1. Open your project in Publisher Account.
  2. In the side menu, click Login.
  3. Select the Login project and click Configure.
  4. Select the Callback URLs section.
  5. In the Callback URL field, specify the same user redirect paths that you specified earlier when configuring the OAuth 2.0 client.
  6. Click Save changes.

To open the Xsolla Login widget, call the AuthWithXsollaWidget SDK method and pass the following to it:

  • the OnSuccess callback for handling user authentication and getting a token
  • the OnCancel callback to handle the closing of the widget by a user without authentication (optional)

Note
For standalone builds, the widget opens in the built-in browser that is included with the SDK. You can either use Xsolla’s built-in browser or a different built-in browsing solution that allows you to track URL changes. To do this, implement your own methods to open the widget (you can use AuthWithXsollaWidget as an example).
Xsolla provides standard widget templates. Their appearance and content is determined by the Login method chosen for your project and widget customization settings from Publisher Account.
Notice
Widget customization is available only after you sign the Xsolla Product Licensing Agreement. To sign the agreement, go to the Agreements & Taxes > Agreements section in your Publisher Account.
Standard view of the classic login widget:

Demo project widget view for several Login methods:

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.

Useful links

Last updated: January 22, 2024

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!