70. SMS Authentication
Guide how to use SMS Authentication.
Implemetation SMS authentication
In order to use SMS authentication function, you must consult with Kakao in advance. (Charge: kakaoGames Business PM, Technology PM)
Implemetation methods
The KakaoGameSDK supports Reach Kakao interactions in two ways:
Authenticate at a specific time
Authenticate in Kakao login process
Developers can choose the appropriate method based on their game. Depending on the method you choose, game settings will vary, so be sure to tell us how to use it .
1. Authenticate at a specific time
This is used when the developer wants to proceed with the authentication at a certain point (eg, auction entry).
1-1. Age-limited users are games that prevent gameplay
At the time of login, the SDK checks the status of the identity internally, exposing the guidance popup and ending the game if the user is less than the age limit.
If the user has not yet authenticated himself, the user will be able to log in without proceeding with the SMS authentication process.
Authentication Status | Description | Login Result |
---|---|---|
Unknown | A user is not yet authenticated. | Success |
Under age limit | A user has already authenticated but he is an under age-limited user. | Fail, Quit Game |
Over age limit | A user has already authenticated and he is a user with an age limit or higher. | Success |
At a certain point when you want to authenticate, you can call KGKakaoProfile.requestAgeVerification API. (hereafter referred to as the authentication API)
Please refer to the figure as below.
If the result is the underage after completing SMS authentication, an UnderAgePlayer error will be returned.
At that time, you should quit your game after expose the guidance message to the user and call logout.
If that user logs in again with the same account, the login fails and the game ends automatically because of the age information.
1-2. Age-limited users can also play, but if they are limited to specific content
In this case, all users can log in because their authentication results have no effect on their login.
In the game, you can call KGKakaoProfile.requestAgeVerification after login to get the status information of the user and use it freely according to the plan of the game.
If you want to process your authentication in 1-2 ways, specify the key as follows in 'kakao_game_sdk_configuration.xml'.
Key | Value | Description |
---|---|---|
ageAuthFailProcessKill | false | process kill option off |
example)
<?xml version="1.0" encoding="UTF-8"?> <configuartion-list> <configuration key="appId" value="YOUR_APP_ID" /> ... <configuration key="ageAuthFailProcessKill" value="false"/> </configuartion-list> |
---|
2. Authenticate in Kakao login process
The Kakao Game SDK processes the SMS authentication in the Kakao login process.
2-1. Age-limited users are games that prevent gameplay
If the user has not been authenticated, SMS authentication will proceed. If the user is found to be below the age limit, login will fail.
Users will not be able to log in to the game unless they verify their identity.
2-2. Age-limited users can also play, but if they are limited to specific content
If the user is below the age limit, the login succeeds and if you restrict usage of specific content, the developer can adjust it with the config file.
If the user has not yet authenticated himself, the SMS authentication will be processed. Even if the user is below the age limit, the login will succeed.
After login succeeds, it checks the status of the user by using 1 API.
If you want to process your authentication in 2-2, specify two keys as follows in 'kakao_game_sdk_configuration.xml'.
Key | Value | Description |
---|---|---|
ageAuthOnLogin | true | Proceeding SMS authentication on login |
ageAuthFailProcessKill | false | process kill option off |
example)
<?xml version="1.0" encoding="UTF-8"?> <configuartion-list> <configuration key="appId" value="YOUR_APP_ID" /> ... <configuration key="ageAuthOnLogin" value="true"/>
<configuration key="ageAuthFailProcessKill" value="false"/> </configuartion-list> |
---|