Authentication for Public Clients
If you havePublic Client enabled on your Discord app, you can use the following code to authenticate your players with the external provider directly from the client โ no backend required. Before using this method, you must configure your identity provider in the Developer Portal.
How the Flow Works
Once authentication is complete, you can use the access token as you would a full Discord userโs access token. See Managing Provisional Accounts for token refresh, storage, and display names.Error Handling
Common error codes and solutions when creating a provisional account:
If you are using OIDC, you may encounter more specific errors:
Next Steps
Managing Provisional Accounts
Refresh access tokens and set display names.
Merging Accounts
Merge a provisional account into a full Discord account.
Unmerging Accounts
Sever the link between a Discord account and a provisional account.
#social-sdk-dev-help channel for support from the community.
If you encounter a bug while working with the Social SDK, please report it here: https://dis.gd/social-sdk-bug-report