Set up user authentication via Xsolla Wallet account
To set up user authentication with Xsolla account:
- Create a Login project in Publisher Account.
- Create an Xsolla account OAuth 2.0 client.
- Enable Xsolla as a social network.
- Set up callback URLs.
Create Login project
- Open your project in Publisher Account.
- Click Login in the side menu.
- Click Create Login project.
- Select Standard Login project and click Create and set up. Once your new Login project is created, you can see the page with Login project settings.
During the integration process, you will need your Login ID. To get it, click the name of your Login project in breadcrumb trail to return to the Login project page, and click Copy ID beside the name of the Login project.
Create Xsolla account OAuth 2.0 client
Contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com and provide the following information:
Parameter | Type | Example | Description |
---|---|---|---|
Redirect URIs | Array of strings | [“https://example.com/oauth/callback”, “http://localhost:3000/oauth/callback”] | A list of URI addresses that can be used for redirecting the user after authentication through Xsolla account. |
Audience | String | “https://example.com” | The domain where users can log in via Xsolla account. |
Scope | Array of strings | [“email”, “transactions”] | List of permissions in Xsolla account. |
Enable Xsolla as social network
- Open your project in your Publisher Account and go to the Login section.
- Click Configure in the pane of a Login project.
- In the Login methods block, select Social login.
- Click Configure.
- Select Xsolla from the list of social networks.
- Click the ⚙ icon and select Settings.
- Fill in the following fields:
- Application ID — the Xsolla account OAuth 2.0 client identifier you received from Xsolla.
- Application secret key — the Xsolla account OAuth 2.0 key you received from Xsolla.
- Your website link — the website from which requests for exchange of authorization code exchange for a user authorization token will be sent. Specify the same URL address that was indicated as the Audience parameter when creating the Xsolla account OAuth 2.0 client.
- Click Connect.
- Click back to Social Networks.
- Set the Embed social network JWT token toggle to On.
- Click Save changes.
Set up callbacks URLs
- Go to the Callback URLs tab.
- Make sure that the following URLs are added in the Callback URL section:
https://login-widget.xsolla.com/latest/babka-auth-succeed
https://login.xsolla.com/api/social/oauth2/callback
- In the Allowed origins (CORS) section:
- Make sure that the
https://metaframe.xsolla.com
value is added. - Add the URLs of the domain where the Metaframe widget will be used.
- Make sure that the
- Click Save changes.
Was this article helpful?
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.Found a typo or other text error? Select the text and press Ctrl+Enter.