#

SUD

Introduction

  • The app server needs to implement the HTTPS callback API for game server authentication and obtaining basic user information.
  • sud-mgp-auth-node provides most functions for callback API implementation. The app server only needs to implement the HTTPS API and call sud-mgp-auth-node.

SDK environment requirements

  • node 8 or later
  • Contact Sud.Tech to allocate appId, appKey, and appSecret for your service.

Integration process

  1. NPM Configuration
  2. It is recommended to create a common company GitHub account (user->setting->Developer settings->Personal access tokens->Generate new token), generate a token for Npm packages, and configure permissions as shown in the image below: image

  3. Create a .npmrc file in the root directory of your project and configure it as follows: //npm.pkg.github.com/:_authToken=Token for Npm packages
    @sudtechnology:registry=https://npm.pkg.github.com/

  4. Import the package into your project: npm install @sudtechnology/sud-mgp-auth-node

  5. Use the APIs provided by SudMGPAuth to implement the following callback interfaces for small game service authentication and user information retrieval. You can refer to the demo.

    • get_code: This interface is used to generate a short-term token code before initializing the client SDK. It is called by the app to the business server. You can implement it by referencing the server SDK. For specific implementation, refer to the login method in the demo. If you do not use the SDK, you can refer to the explanation in ImplementAuthenticationByYourself.md.

    • get_sstoken

    • update_sstoken

    • get_user_info

results matching ""

    No results matching ""