Skip to main content

Get started

Overview

This page guides you through the process of getting started with the Sky Mavis Account service. After completing the steps, you will be able to implement authentication with Sky Mavis Account using the provided OAuth 2.0 API.

Prerequisites

A developer account. To sign up, visit the Developer Console.

Steps

Step 1. Request access to Sky Mavis Account

  1. Go to the Developer Console.
  2. Create a new app or select an existing app.
  3. Select your app, then go to App Permission > Sky Mavis Account (OAuth 2.0) > Request Access.
  4. Fill out the form and submit the request.

After your request is approved, you can see an OAuth 2.0 menu in the list of products.

Step 2. Configure OAuth 2.0 settings

To configure the client-side OAuth 2.0 settings, go to the Developer Console, then your app > OAuth 2.0.

  1. In CLIENT SECRET, generate your client secret string. The client secret and your API key are the two required credentials to authenticate your requests to the Sky Mavis Account service.
  2. In GRANT TYPE, define how your app will obtain access tokens from the Sky Mavis Account service. Choose the grant type that best suits your development environment and security needs:
    • Authorization Code: this is an established flow for both web and mobile apps. It involves a two-step process:
      • Authorization code flow (frontend): the user is redirected to the Sky Mavis Account authorization server for login and consent. Upon successful authorization, the server redirects the user back to your application with an authorization code.
      • Token exchange flow (backend): your app securely exchanges the authorization code for an access token using a server-to-server request to the Sky Mavis Account token endpoint. This keeps sensitive credentials like client secrets away from the client-side.
    • Refresh Token: this token allows your app to obtain a new access token without requiring the user to re-authenticate, extending the access token's lifespan. This is typically used alongside the Authorization Code grant.
    • Implicit: this simplified flow retrieves the access token directly in the browser after user consent. While convenient, it exposes the access token in the URL fragment, making it vulnerable to interception. This method is generally not recommended for production use due to security risks.
    • Resource Owner Credentials: this flow allows your app to directly exchange user credentials (username/password) for an access token. Sky Mavis Account only supports this flow with Ronin Wallet for specific use cases. Due to the security implications of sharing user credentials, use this option cautiously and only if other flows are not suitable.
  3. Add URIs for signing in (the location to which you want the user to be redirected after the authorization is complete) and signing out (the location where the user is redirected after logging out of your app).
  4. Save the settings.

Next steps

Use OAuth 2.0 for authentication