Custom Login
If you have your own login system, Coda allows you to easily integrate it into your web store. Our setup follows the industry-standard OAuth 2.0 protocol, so integration is simple.
When should you use Custom Login?
You have your own proprietary login system that your users are familiar with. Offering the same login method (and hence, user credentials) instils a sense of trust and reduces friction when your users visit the web store.
Integration details
You must provide OAuth 2.0 endpoints:
/authorize,/token,/userinfoYour Web Store’s URL must be allowlisted in your OAuth configuration
The user profile data you send us should include:
user_id(mandatory),email,display_name(or)nicknameAll communication must use HTTPS, and it is recommended to follow OAuth 2.0 best practices
Custom Login Authentication flow
1. User lands on the Web Store
The user visits the web store (for example, https://store.example.com). A Sign In call-to-action (CTA) is visible in the UI.
2. User Initiates Sign In
When the user clicks on the Sign In CTA, the web store redirects the user to the game publisher's OAuth login endpoint, typically using: https://auth.publisher.com/authorize?client_id=...&redirect_uri=...&response_type=code&scope=...
3. User Authenticates with Game Publisher
The user enters their existing login credentials. Upon successful authentication, the publisher redirects the user back to the web store with an authorisation code. Sample: https://store.example.com/callback?code=AUTH_CODE
4. Web Store exchanges AUTH_CODE for a Token
The web store receives the AUTH_CODE and sends a token request to the publisher's token endpoint: POST https://auth.publisher.com/token
In response, the web store receives tokens - an access token and an optional refresh token - as well as optional user details such as email, nickname, etc.
You can also request for the token to be sent again to your backend for verification before sharing the above-mentioned user details.
5. Create or Update Web Store Account
The web store creates a new user record in its database (or updates an existing one, if available) using the data received. This links the game publisher's identity with a web store account and allows the user to appear logged in on the web store.
Last updated
Was this helpful?