Web
This article guides you through setting up DMM as an identity provider, enabling your website to access Player Network authentication services.
Prerequisites
1. Set up the DMM app
Contact DMM tech support to obtain a developer account with relevant permissions and app parameters.
Required app parameters:
- App ID
- Secret key
- Consumer key
- Consumer secret
- Authentication client ID
- Authentication client secret
- Create an account for Player Network Console.
- Create a new project for your game, or join an existing one.
- Add DMM as an authentication method for your project on Player Network Console.
For more details about integrating the SDK for other third-party channels, see JavaScript SDK.
Step 1: Install the JavaScript SDK
Install the SDK package from the production environment when launching the game. The SDK package from the test environment is only used for integration testing.
Install the JavaScript SDK from npm
or CDN
.
- npm
- CDN
$ npm install @intlsdk/account-api
// SDK production version package
<script src="https://common-web.intlgame.com/sdk-cdn/account-api/latest/index.umd.js"></script>
Step 2: Instantiate the SDK
Set env
to the test environment during the integration testing and env
to the corresponding production environment when launching the game.
const accountApi = new IntlgameAccountApi({
env: "test", // SDK environment
gameID: 11,
});
Parameter | Type | Description | Remark |
---|---|---|---|
env | string | SDK environment For more information, see Retrieve cluster information. | Required |
gameID | number | Unique game ID assigned by Player Network | Required |
Step 3: Implement web login
Follow the login workflow to implement web login.
For more information on the third-party login APIs, see:
API | Function |
---|---|
ThirdAuthorize | Third-party authorization |
IntlAuthorize | Player Network account authorization |
IntlLogout | Logs out |