Skip to content
Stove
Cập nhật lần cuối

Are you curious about the actual implementation flow?

Usage Scenario / Logging In

Login (User Flow)

Understanding


STOVE Login is the standard procedure for users to access games or web services using their STOVE account. It supports various authentication methods such as Email, Guest, and 3rd party (Google, Facebook, Apple, etc.). Depending on the launch platform (Mobile/PC/Web), you can integrate it by using the SDK integrated UI or by configuring the UI directly within the game.

Login Flow

The login flow and the tools used vary depending on the platform where the game is released. You only need to integrate the necessary areas according to your game's launch format.

Platform Integration Tool Login UI Configuration Method Representative Entry Scenario
Mobile Mobile SDK Integrated UI (AuthUI) / Direct Configuration (Auth DATA API) App launch → Account login → Enter game
PC PC SDK + STOVE PC Client SDK automatically receives launcher login information Game launch after launcher login → Auto-login
Web STOVE Web Authentication (GNB / Login URL) Responsive GNB UI or STOVE login page Account login from official website/event page

Note on Platform Integration
ㆍ Multi-platform games integrate necessary platforms together, such as Mobile + PC + Web.
ㆍ Even if the platforms are different, the STOVE member identifier remains the same, ensuring a seamless account experience.

Login Process

Existing members log in, while new users sign up or enter the game as guests.
Regardless of the platform (Mobile/PC/Web), the login process can be summarized into the following 3 steps.

Step Task Description
1 Initialize SDK or Web Module Acquire initial information for using STOVE services
2 Perform Login Log in with an account and issue a User Access Token. Handle terms of service agreement if necessary
3 Prepare for Game Entry Save character information after selecting a server/world. Used for identification in coupons, pop-ups, billing, push notifications, etc.

Login Methods

The STOVE SDK supports two login methods. Although expressed based on the Mobile SDK, the same concepts apply to each platform.

Method Description
Integrated Login UI (Auth.UI) Easily implement authentication with an integrated UI. Adding or removing authentication methods is flexible
Direct Login Implementation (DATA API) Implement desired authentication directly using DATA API. Obtain tokens via provider-specific login

Criteria for Choosing a Method
ㆍ If fast launch and using a standard UI are priorities, we recommend the Integrated Login UI.
ㆍ If a game-specific UI/UX is required, choose the Direct Login (DATA API) method.

Provider Types

A Provider is an authentication channel. Select and register the channels the game will expose. (Based on Mobile SDK)

Provider Android iOS Unity Unreal
Email (STOVE) O O O O
Guest O O O O
Google O O O O
Facebook O O O O
Apple O O O O
Steam O O O O
LINE O O O O
Naver O O O O

PC/Web Channel Reference
ㆍ PC uses the login channel of the Stove PC client, and Web uses the channel of the Stove login page.
ㆍ PC/Web channels may vary depending on platform policies, so please check with the technical PM in charge.

Provider Display Order

On the mobile SDK login screen, providers are displayed in the order you have set.

  • Email is mandatory and must be displayed first in the list.
  • Multi-platform (PC-supported) games must display all providers offered by Stove, and individual selection is not possible.
  • The recommended display order by region can be found in 이용 시나리오 > 로그인하기.

Additional Login Features

These are additional features provided along with Stove login, in addition to basic login.

Function Supported Platforms Description
GPG Login
(Google Play Games)
Mobile SDK (Android) 1:1 connection between Google Play Games account and STOVE account
Auto-login Mobile SDK, PC SDK Automatic login without input if a valid token exists

Precautions

Please check before integrating login
ㆍ Server-side token validation is mandatory after login. Please refer to 인증 가이드 for the validation flow.
ㆍ Character setup is mandatory. If not set, back-office integration features (coupons, pop-ups, billing, push, etc.) will not function.

Integration Guide


Preparation by Platform

You only need to proceed with the preparation for the platforms required based on your game's release format.

Platform Required Items
Mobile ㆍ Apply Mobile SDK
ㆍ Set App ID/Client ID
ㆍ Register Package/Bundle ID
ㆍ Pre-configuration per 3rd party Provider
PC ㆍ Apply PC SDK (PCSDK3)
ㆍ Set App ID/Client ID
ㆍ Login handled by STOVE PC client (no separate Provider setup required)
Web ㆍ Available if the domain is xxx.game.onstove.com
ㆍ Domain connection and referral path code handled by Technical PM
ㆍ External infrastructure requires SSL certificate
Server ㆍ Issue API Access Token for token validation (Authentication Guide reference)
ㆍ Firewall settings required when using SSO

3rd party Provider pre-configuration must be completed before launch
ㆍ Console settings, key issuance, and app settings for all Providers to be used must be completed for them to appear on the login screen.
ㆍ Failure to do so may delay the verification schedule.

Below is a summary of console settings, key issuance, and app settings for each 3rd party Provider. Please expand only the items for the Providers you intend to use. Follow Development Environment Setup for STOVE Maven repository registration and SDK module versions; this section only covers keys and settings per Provider. Console key values (Client ID, Secret, Channel ID, etc.) are issued and delivered through the publishing technical manager (Technical PM).

Googlegoogle_web_client_id · GoogleClientID · URL Scheme

Android requires google_web_client_id (includes client secret if web login is supported), and iOS requires GoogleClientID and a URL Scheme.

Key Issuance

  • Google Cloud Console → Obtain 'Web application' type Client ID (google_web_client_id) from Credentials. If Android supports Google web login, also obtain the client secret.
  • Obtain iOS GoogleClientID and URL Scheme
  • Normal login is only possible if credentials are registered with your company's package name

Authorized Redirect URIs (when calling web login)

Not mandatory unless the game calls web login.

Credentials → OAuth 2.0 Client IDs → Type 'Web application' → Register authorized redirect URIs for each environment.

text
Sandbox : https://m-member.gate8.com/google/redirect
Live    : https://m-member.onstove.com/google/redirect

Android

xml
<!-- strings.xml -->
<resources>
    <string name="google_web_client_id" translatable="false">{your-web-client-id}.apps.googleusercontent.com</string>
    <!-- 구글 웹 로그인 지원 시 -->
    <string name="google_web_client_secret" translatable="false">{your-web-client-secret}</string>
</resources>
xml
<!-- AndroidManifest.xml -->
<application>
    <meta-data
        android:name="com.stove.auth.google.web_client_id"
        android:value="@string/google_web_client_id" />

    <!-- 이하 구글 웹 로그인 지원 시에만 추가 -->
    <meta-data
        android:name="com.stove.auth.google.web_client_secret"
        android:value="@string/google_web_client_secret" />
    <activity
        android:name="com.stove.auth.google.CustomTabActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="stove-${applicationId}" />
        </intent-filter>
    </activity>
    <!-- Android 11+ 웹 로그인 지원 시 -->
    <queries>
        <intent>
            <action android:name="android.support.customtabs.action.CustomTabsService" />
        </intent>
    </queries>
</application>

iOS```xml

GoogleClientID {your-google-client-id} CFBundleURLTypes CFBundleURLSchemes {your-google-url-scheme} ```

!info
iOS Google SignIn framework version
ㆍ Google module 2.4.0 supports Google SignIn v5.0.2, and 2.4.1 or higher supports v6.2.2.
ㆍ The framework is external-frameworks 저장소download the corresponding version from here.

Unity

  • Stove → Edit Settings → Check 'Use Auth-Google' in the Inspector
  • (Android) WebClientIdin google_web_client_id Enter (also enter the secret if web login is supported)
  • (iOS) ClientId·ClientSchemein GoogleClientID·Enter URL Scheme

Unreal

[StoveSDK] → [StoveSDK_APL.xml]Set meta-data in .

xml
<!-- google login -->
<addElements tag="application">
    <meta-data
        android:name="com.stove.auth.google.web_client_id"
        android:value="{your-google-client-id}" />
    <!-- 웹 로그인 지원 시 -->
    <meta-data
        android:name="com.stove.auth.google.web_client_secret"
        android:value="{your-google-client-secret}" />
</addElements>

For iOS, merge the above Info.plist values into Project Settings → iOS → Extra PList Data → Additional Plist Data.

Facebookfacebook_app_id · facebook_client_token

The Facebook app's facebook_app_idand facebook_client_tokenare required.

!info
client_token is mandatory
ㆍ Starting from Android auth-facebook 2.5.0 and iOS AuthFacebook 2.4.1, client_token setting is mandatory.

Key Issuance

  • Facebook for Developers → Select your app
  • facebook_app_id: Check in the top left of the page under 'App ID'
  • facebook_client_token: Check in Settings → Advanced Settings → Security → Client Token

Android

xml
<!-- strings.xml -->
<resources>
    <string name="facebook_app_id" translatable="false">{your-app-id}</string>
    <string name="fb_login_protocol_scheme" translatable="false">fb{your-app-id}</string>
    <string name="facebook_client_token" translatable="false">{your-client-token}</string>

</resources>
xml
<!-- AndroidManifest.xml -->
<application>
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />
    <meta-data
        android:name="com.facebook.sdk.ClientToken"
        android:value="@string/facebook_client_token" />
    <activity
        android:name="com.facebook.CustomTabActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="@string/fb_login_protocol_scheme" />
        </intent-filter>
    </activity>
</application>

iOS

xml
<!-- Info.plist -->
<key>FacebookAppID</key>

<string>{your-app-id}</string>

<key>FacebookDisplayName</key>

<string>{your-app-name}</string>

<key>FacebookClientToken</key>

<string>{your-app-client-token}</string>

<key>CFBundleURLTypes</key>

<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>fb{your-app-id}</string>
    </array>
  </dict>
</array>
<key>LSApplicationQueriesSchemes</key>

<array>
    <string>fbapi</string>
    <string>fb-messenger-share-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>

</array>

Unity

  • Stove → Edit Settings → Check 'Use Auth-Facebook' in the Inspector
  • AppIdin facebook_app_id Enter

Unreal

[StoveSDK] → [StoveSDK_APL.xml]Set meta-data in .

xml
<!-- facebook login -->
<addElements tag="application">
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="fb{facebook_app_id}" />
    <meta-data
        android:name="com.facebook.sdk.ClientToken"
        android:value="facebook_client_token" />
</addElements>

For iOS, merge the above Info.plist values into Project Settings → iOS → Extra PList Data → Additional Plist Data.

AppleServices ID · Capabilities

!info
Sign In with Apple is mandatory for App Store release
ㆍ It is a 3rd party authentication that must be applied for iOS App Store release. It is supported from iOS 13 and above, and can be used on Android regardless of the version.

Android — Services ID Issuance and Settings

!warning
Identifier must have .appleid suffix
ㆍ When creating a Service ID as a domain-style identifier, you must append .appleid as a suffix. (e.g., com.stove.mvp.google.appleid)

  • Register Redirect URL for each environment.
text
m-member.gate8.com
m-member.onstove.com

https://m-member.gate8.com/appleid/redirect
https://m-member.onstove.com/appleid/redirect

!info
When using the same Service ID across multiple packages
ㆍ If you set com.stove.auth.apple.service.id, you can share the same Service ID across multiple packages. In this case, use the value excluding the suffix .appleid as the meta-data value. If not set, the app package name is used as the Service ID.

xml
<!-- strings.xml : .appleid 접미사를 제거한 값 사용 -->
<resources>
    <string name="apple_service_id" translatable="false">com.stove.mvp.google</string>

</resources>
xml
<!-- AndroidManifest.xml -->
<application>
    <meta-data
        android:name="com.stove.auth.apple.service.id"
        android:value="@string/apple_service_id" />
</application>

iOS — Capabilities Settings

  • Apple Developer Add Sign In with Apple Capability to the target App ID in
  • Xcode → Add Sign In with Apple in Signing & Capabilities of the target
  • If additional data is needed after authentication, add Scopes before logging in.
objectivec
SGSAppleProvider *appleProvider = [[SGSAppleProvider alloc] init];
[appleProvider addScopes:@[ASAuthorizationScopeFullName, ASAuthorizationScopeEmail]];

Unreal

For Android, [StoveSDK] → [StoveSDK_APL.xml] set meta-data in .

xml
<addElements tag="application">
    <meta-data
        android:name="com.stove.auth.apple.service.id"
        android:value="{your-apple-service-id}" />
</addElements>

For iOS, since the Capabilities item is not displayed in the settings menu, modify the config file directly. If you add Config/DefaultEngine.ini to the [/Script/IOSRuntimeSettings.IOSRuntimeSettings] item of bEnableSignInWithAppleSupport=True, Capabilities will be automatically entered during build.

SteamNo key issuance required

!info
Steam does not have a separate console or key issuance
ㆍ It does not use a separate developer console, so key issuance and settings are not required.
ㆍ Auth / AuthUI 2.8.4 or higher is required.

Android

Just add the module dependency.

groovy
dependencies {
    // ...
    implementation 'com.stove:auth-steam:2.9.0'
}

iOS

Add the module to the Podfile.

ruby
target '{ProjectTargetName}' do
  # ...
  pod 'SGSAuthSteam', '2.9.0'
end
LINEline_channel_id

You need the line_channel_id for the LINE channel.

Key Issuance and Console Settings

  • LINE Developers → Check the Channel ID in your app
  • Register the Android packageName and iOS URL Scheme (Bundle ID) in the LINE Login tab

!warning
Please contact the Technical PM for LINE project registration
ㆍ Receive the Channel ID after LINE project registration.

Android

xml
<!-- strings.xml -->
<resources>
    <string name="line_channel_id" translatable="false">{your-channel-id}</string>

</resources>
xml
<!-- AndroidManifest.xml -->
<application>
    <meta-data
        android:name="com.stove.auth.line.channel_id"
        android:value="@string/line_channel_id" />
</application>

iOS

xml
<!-- Info.plist -->
<key>LINE_CHANNEL_ID</key>

<string>{your-line-channel-id}</string>

<key>CFBundleURLTypes</key>

<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    </array>
  </dict>
</array>
<key>LSApplicationQueriesSchemes</key>

<array>
  <string>lineauth2</string>

</array>

Unity

  • Stove → Edit Settings → Check 'Use Auth-LINE' in the Inspector
  • channelId Enter the received Channel ID in

Unreal

[StoveSDK] → [StoveSDK_APL.xml] Set the meta-data in

xml
<!-- LINE login -->
<addElements tag="application">
    <meta-data
        android:name="com.stove.auth.line.channel_id"
        android:value="@string/line_channel_id" />
</addElements>

For iOS, merge the Info.plist values above into Project Settings → iOS → Extra PList Data → Additional Plist Data.

Naverclient_id · client_secret · client_name

You need the naver_client_id·naver_client_secret·naver_client_name for the Naver app. naver_client_name is the app name displayed during login.

Key Issuance and Console Settings

  • Naver Developers → Check application information in your app
  • Register the Android app package name and iOS URL Scheme in API Settings

!warning
Please contact the Technical PM for Naver key issuance
ㆍ Receive the NaverClientID·NaverClientName·NaverClientSecret.

!info
iOS URL Scheme Format
ㆍ Enter the iOS Bundle ID with the naver prefix in lowercase. (Format: naver + iOS Bundle ID)
ㆍ Example: If the Bundle ID is com.stove.mvp.iosqa, then → navercom.stove.mvp.iosqa

Android

xml
<!-- strings.xml -->
<resources>
    <string name="naver_client_id" translatable="false">{your-client-id}</string>
    <string name="naver_client_secret" translatable="false">{your-client-secret}</string>
    <string name="naver_client_name" translatable="false">{your-app-name}</string>

</resources>
xml
<!-- AndroidManifest.xml -->
<application>
    <meta-data
        android:name="com.stove.auth.naver.client_id"
        android:value="@string/naver_client_id" />
    <meta-data
        android:name="com.stove.auth.naver.client_secret"
        android:value="@string/naver_client_secret" />
    <meta-data
        android:name="com.stove.auth.naver.client_name"
        android:value="@string/naver_client_name" />
</application>

iOS

xml
<!-- Info.plist : SGSAuthNaver v2.8.2 이상 -->
<key>NidClientID</key>

<string>{your-naver-client-id}</string>

<key>NidAppName</key>

<string>{your-naver-client-name}</string>

<key>NidClientSecret</key>

<string>{your-naver-client-secret}</string>

<key>NidUrlScheme</key>

<string>naver{iOS Bundle ID 소문자}</string>

<key>CFBundleURLTypes</key>

<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>naver{iOS Bundle ID 소문자}</string>
    </array>
  </dict>
</array>
<key>LSApplicationQueriesSchemes</key>

<array>
    <string>naversearchapp</string>
    <string>naversearchthirdlogin</string>

</array>

!info
Key Changes in v2.8.1 → v2.8.2 Update
ㆍ NaverClientID → NidClientID, NaverClientName → NidAppName, NaverClientSecret → NidClientSecret have been changed.
ㆍ NidUrlScheme Key has been added. Enter the Naver URL Scheme from the CFBundleURLTypes of CFBundleURLSchemes into the value.
ㆍ Versions v2.8.1 and below use the existing NaverClientID series keys.

Unity

  • Stove → Edit Settings → Check 'Use Auth-Naver' in the Inspector
  • ClientId·ClientSecret·ClientName Enter the received values in

Unreal

[StoveSDK] → [StoveSDK_APL.xml] Set the meta-data in

xml
<!-- Naver login -->
<addElements tag="application">
    <meta-data
        android:name="com.stove.auth.naver.client_id"
        android:value="naver_client_id" />
    <meta-data
        android:name="com.stove.auth.naver.client_secret"
        android:value="naver_client_secret" />
    <meta-data
        android:name="com.stove.auth.naver.client_name"
        android:value="naver_client_name" />
</addElements>

For iOS, merge the Info.plist values above into Project Settings → iOS → Extra PList Data → Additional Plist Data.

Overall Login Flow

Even if the platforms (Mobile/PC/Web) are different, the login sequence remains the same. Only the specific methods for implementing each step (SDK functions, UI configuration, etc.) vary depending on the platform.

Development


This is how to implement authentication using the STOVE SDK's integrated login UI. The core flow of the integrated login is Auth.initialize → setProvider → AuthUI.login → User.setGameProfile It proceeds in a 4-step sequence.

1. Initialization (Auth.initialize)

This is the step to acquire the initial information required to use the service. Initialization must be completed before you can use SDK features such as login, payment, and coupons.

  • Acquire service settings (service_id, market_game_id)
  • Check if an app update is required
  • Check if the game is under maintenance

!info
App updates and game maintenance are handled automatically
Auth.initialize If you pass the Result received in the response to OperationUI.handleResult(activity, result, listener) as is, the SDK will automatically display the maintenance (MaintenanceError 30003) / app update (AppUpdateError 30004) screen. Continue the game entry flow within the callback.
Refer to the code example in the 앱 업데이트 및 게임 점검 처리 section below.

=== "Unity"

csharp
public void AuthInitialize()
{
    Auth.Initialize(result =>
    {
        if (result.IsSuccessful)
        {
            //초기화 성공
            /** 초기화 성공 및 앱 선택 업데이트 처리 **/
            OperationUI.HandleResult(result, (Result operationResult) =>
            {
                //IAP 초기화 | GameConfig 조회 | ...(중략)...
                /** ex) Touch To Screen 화면 노출 (=게임 시작이 준비되어 로그인 가능한 상태) **/
                //사용자가 화면을 터치
                if (Auth.AccessToken != null)
                {
                    /** AccessToken 있음 → 게스트 & 정회원 관계 없이 자동로그인으로 처리 **/
                    Login();
                }
                else
                {
                    /** AccessToken 없음 → 사용자 로그인 방식을 선택할 수 있도록 화면 제공 (`게스트 시작 & 로그인`) **/
                    //사용자가 `게스트 시작`을 선택한 경우 → 게스트로 시작 (3.0.0 이상 Unity · Unreal: `AuthUI.GuestStart`)
                    //`로그인`을 선택한 경우 → 통합 로그인으로 시작 (`AuthUI.Login`)
                }
            });

        }
        else if (result.Domain.Equals(Auth.Domain))
        {
            if (result.ErrorCode == AuthConfigurationError)
            {
                //설정 오류
                //set meta-data 'com.stove.environment' in AndroidManifest.xml
                //"check constants server :client_id and service_id are null or empty"
            }
            else
            {
                //ErrorCode == 30003 점검
                //ErrorCode == 30004 강제 업데이트
                /** 점검 및 앱 강제 업데이트 팝업 처리 **/
                OperationUI.HandleResult(result, (Result operationResult) =>
                {
                });
            }
        }
        else
        {
            //네트워크 또는 기타 서버 에러
            OperationUI.HandleResult(result, (Result operationResult) =>
            {
            });
        }
    });
}

=== "Unreal"

cpp
#include "Auth.h"
#include "OperationUI.h"
#include "Result.h"

Auth::Initialize([] (Result result) {
    string resultString = result.ToJSONString();

    if (result.IsSuccessful()) {
        OperationUI::HandleResult(result, [] (Result operationResult) {
            //IAP 초기화 | GameConfig 조회 | ...(중략)...
            /** ex) Touch To Screen 화면 노출 (=게임 시작이 준비되어 로그인 가능한 상태) **/
            //사용자가 화면을 터치
            AccessToken accessToken = Auth::GetAccessToken();

            if (!accessToken.IsNull()) {
            {
                /** AccessToken 있음 → 게스트 & 정회원 관계 없이 자동로그인으로 처리 **/
                Login();
            }
            else
            {
                /** AccessToken 없음 → 사용자 로그인 방식을 선택할 수 있도록 화면 제공 (`게스트 시작 & 로그인`) **/
                //사용자가 `게스트 시작`을 선택한 경우 → 게스트로 시작 (3.0.0 이상 Unity · Unreal: `AuthUI.GuestStart`)
                //`로그인`을 선택한 경우 → 통합 로그인으로 시작 (`AuthUI.Login`)
            }
        });
    } else if (result.domain.Equals(Auth::Domain, ESearchCase::CaseSensitive)) {
        if (result.errorCode == Auth::AuthConfigurationError) {

        } else {
            // 강제 업데이트, 점검
            OperationUI::HandleResult(result, [] (Result operationResult){

            });
        }
    } else {
        // 네트워크 또는 기타 서버 에러
        OperationUI::HandleResult(result, [] (Result operationResult){

        });
    }
});

=== "Android (Kotlin)"

kotlin
fun initialize(activity: Activity) {
    Auth.initialize(activity.applicationContext) { result ->
        when {
            result.isSuccessful() -> {
                //Init succeed. Handle optional app update
                OperationUI.handleResult(activity, result) {
                    //Do login.
                }
            }
            result.domain == Auth.Domain -> {
                when (result.errorCode) {
                    Auth.AuthConfigurationError -> {
                        //set meta-data 'com.stove.environment' in AndroidManifest.xml
                        //"check constants server :client_id and service_id are null or empty"
                    }
                    else -> {
                        //Handle required app update & maintenance
                        OperationUI.handleResult(activity, result) {

                        }
                    }
                }
            }
            else -> {
                //NetworkError
                //User notify & retry initialize
                OperationUI.handleResult(activity, result) {
                    initialize(activity)
                }
            }
        }
    }
}

=== "Android (Java)"

java
public void initialize(@NotNull final Activity activity) {
    Auth.initialize(this, (@NotNull Result result) -> {
        if (result.isSuccessful()) {
            //Init succeed. Handle optional app update
            OperationUI.handleResult(activity, result, (@NotNull Result handleResult) -> {
                //Do login.
                return null;
            });
        } else if (result.getDomain().equals(Auth.Domain)) {
            switch (result.getErrorCode()) {
                case Auth.AuthConfigurationError:
                    //set meta-data 'com.stove.environment' in AndroidManifest.xml
                    //"check constants server :client_id and service_id are null or empty"
                    break;
                default:
                    //Handle required app update & maintenance
                    OperationUI.handleResult(activity, result, (@NotNull Result handleResult) -> null);
            }
        } else {
            //NetworkError
            //User notify & retry initialize
            OperationUI.handleResult(activity, result, (@NotNull Result handleResult) -> {
                initialize(activity);
                return null;
            });
        }
        return null;
    });
}

=== "iOS"

objectivec
[SGSAuth initializeWithCompletionHandler:^(SGSResult * _Nonnull result) {
    if ([result isSuccessful]) {
        // 선택 업데이트 또는 성공
        [SGSOperationUI handleResult:result fromViewController:self completionHandler:^(SGSResult * _Nonnull result) {

        }];
    } else if ([[result domain] isEqualToString:SGSAuthErrorDomain]) {
        if ([result errorCode] == SGSAuthErrorAuthConfig) {
            // check constants server : client_id and service_id are null or empty
        } else {
            // 강제 업데이트, 점검
            [SGSOperationUI handleResult:result fromViewController:self completionHandler:^(SGSResult * _Nonnull result) {

            }];
        }
    } else {
        // 네트워크 또는 기타 서버 에러
        [SGSOperationUI handleResult:result fromViewController:self completionHandler:^(SGSResult * _Nonnull result) {

        }];
    }
}];

ErrorCodes

!info
Cases with clear actions

  • 30001 AuthConfigurationError: The partner key (client_id·service_id) is missing. Please ensure the partner-issued key is correctly applied before calling initialization.
  • 30003 MaintenanceError / 30004 AppUpdateError: This is a normal response for maintenance or app updates. OperationUI.handleResultPass the result as-is to the SDK to display the automatic guidance UI. (Do not handle it manually)
DomainErrorCodeDescription
com.stove.success0Success
com.stove.auth30001AuthConfigurationError : Check constants server : client_id and service_id are null or empty
com.stove.auth30003MaintenanceError
com.stove.auth30004AppUpdateError
com.stove.base.network10001NoConnectionError
com.stove.base.network10002TimeoutError




App Update and Game Maintenance Handling

If the initialization result is 'App Update' or 'Game Maintenance', the UI is displayed to guide the user.


=== "Unity"

csharp
public void HandleResult(Result result)
{
    OperationUI.HandleResult(result, (Result handleResult) =>
    {

    });
}

=== "Unreal"

cpp
#include "OperationUI.h"
#include "Result.h"

OperationUI::HandleResult(result, [] (Result operationResult) {

});



=== "Android (Kotlin)"

kotlin
fun handleResult(activity: Activity, result : Result){
    OperationUI.handleResult(activity, result) {
    }
}

=== "Android (Java)"

java
OperationUI.handleResult(activity, result, (@NotNull Result it) -> {
    return null;
});

=== "iOS"

objectivec
[SGSOperationUI handleResult:result fromViewController:fromViewController completionHandler:^(SGSResult * _Nonnull result) {

}];



2. Provider Configuration (setProvider)

AuthUI.loginBefore calling this, register the authentication channels (Providers) that the game will support. They will be displayed on the login screen in the exact order they were registered.


Adding Authentication Channels (Partner Pre-configuration)

Please pre-register authentication information in the Partners Console for each Provider you wish to display on the login screen. Refer to the links below for each channel's setup guide.

  • The Provider list is displayed on the login screen in the order they were added.
  • The Email Provider must be added.
  • If the 'Email Provider' is not set in the connection screen, it will not be displayed.

Applying setProviders Code

AuthUI.setProvidersRegister the Providers the game will support. The order of the array passed is the order in which they appear on the screen. AuthUI.loginMust be executed before calling.


=== "Unity"

csharp
public void SetProviders()
{
    List<Provider> providers = new List<Provider>
    {
        new EmailProvider(),
        new StoveAppProvider(),
        new GuestProvider(),
        new GoogleProvider(),
        new FacebookProvider(),
        new AppleProvider(),
        new SteamProvider(),
        new LineProvider(),
        new NaverProvider()
    };
    AuthUI.Providers = providers;
}

=== "Unreal"

cpp
#include "EmailProvider.h"
#include "StoveAppProvider.h"
#include "GuestProvider.h"
#include "GoogleProvider.h"
#include "FacebookProvider.h"
#include "AppleProvider.h"
#include "SteamProvider.h"
#include "LineProvider.h"
#include "NaverProvider.h"
#include "AuthUI.h"

list<Provider*> provider;
provider.push_back(new EmailProvider());
provider.push_back(new StoveAppProvider());
provider.push_back(new GuestProvider());
provider.push_back(new GoogleProvider());
provider.push_back(new FacebookProvider());
provider.push_back(new AppleProvider());
provider.push_back(new SteamProvider());
provider.push_back(new LineProvider());
provider.push_back(new NaverProvider());

AuthUI::SetProviders(provider);



=== "Android (Kotlin)"

kotlin
fun setProviders(context : Context) {
    AuthUI.setProviders(context, listOf(
        EmailProvider(), StoveAppProvider(), GuestProvider(),
        GoogleProvider(), FacebookProvider(), AppleProvider(),
        SteamProvider(), LineProvider(), NaverProvider()
    ))
}

=== "Android (Java)"

java
public void setProviders(@NotNull Context context) {
    AuthUI.setProviders(context, CollectionsKt.listOf(
        new EmailProvider(), new StoveAppProvider(), new GuestProvider(),
        new GoogleProvider(), new FacebookProvider(), new AppleProvider(),
        new SteamProvider(), new LineProvider(), new NaverProvider()
    ));
}

=== "iOS"

objectivec
SGSEmailProvider *emailProvider = [[SGSEmailProvider alloc] init];
SGSStoveAppProvider *stoveappProvider = [[SGSStoveProvider alloc] init];
SGSGuestAppProvider *guestProvider = [[SGSGuestProvider alloc] init];
SGSAppleProvider *appleProvider = [[SGSAppleProvider alloc] init];
SGSGoogleProvider *googleProvider = [[SGSGoogleProvider alloc] init];
SGSFacebookProvider *facebookProvider = [[SGSFacebookProvider alloc] init];
SGSSteamProvider *steamProvider = [[SGSSteamProvider alloc] init];
SGSLineProvider *lineProvider = [[SGSLineProvider alloc] init];
SGSNaverProvider *naverProvider = [[SGSNaverProvider alloc] init];

NSArray *providers = @[emailProvider, stoveappProvider, guestProvider,
                       appleProvider, facebookProvider, googleProvider,
                       steamProvider, lineProvider, naverProvider];

[SGSAuthUI setProviders:providers];



3. Integrated Login (AuthUI.login)

!info
Flow automatically handled by the SDK within AuthUI.login
The following processes occur with a single integrated login call. If you use the integrated UI, no separate calls are required.

FeatureAutomatic Display TimingCases Requiring Separate Calls
Device Registration/ManagementAutomatically displayed when a new device registration is requiredWhen launching the device management UI directly from the in-game settings screen
Identity VerificationAutomatically displayed when verification is required by law/policyWhen forcing re-verification before entering payment or sensitive features

For direct call code, refer to the 기기 등록, 본인인증 documents.


AuthUI.loginCalling this will automatically operate according to the login flow chart.

It displays the login screen or refreshes the AccessToken, and proceeds to handle terms and conditions if there are any to show the user.

  • AuthUI.login Both login UI display and AccessToken refresh are handled with a single call.
  • 'Login with STOVE APP' is only displayed on devices where the STOVE APP is installed.

=== "Unity"

csharp
public void Login()
{
AuthUI.Login((Result result, AccessToken accessToken) =>
{
if (result.IsSuccessful)
{
if (result.UserInfo != null && result.UserInfo.TryGetValue("userAction", out string userAction))
{
if (!string.IsNullOrEmpty(userAction) && userAction.Equals("sanction"))
{
/** ex) Apply according to game scenario, such as logout or restart **/
}
}
}
else
{
if (result.IsServerError)
{
OperationUI.HandleResult(result, (Result operationResult) =>
{
// 2.9.x and below: The actual error code is returned as ErrorCode
if (result.ErrorCode == 44008 || result.ErrorCode == 45006) { Auth.Logout(); }
if (result.ErrorCode == 44010) { Auth.Logout(); }

// 3.0.0 and above: Mashup wrapping errors (60000 range) return the actual error code as origin_code
if (result.UserInfo != null && result.UserInfo.TryGetValue("origin_code", out string originCode))
{
// Refresh Token error (token expired, must logout and delete local token)
if (originCode == "44010")
{
Auth.Logout();
}

if (originCode == "44008" || originCode == "45006")
{
Auth.Logout();
}
}
});
}
else if(result.IsCanceled) {
if (Auth.AccessToken != null) {
//Retry automatic or manual login
Login();
}
else {
Login();
}
}
else
{
OperationUI.HandleResult(result, (Result operationResult) => { });
}
}
});
}

text

=== "Unreal"

```cpp
#include "AuthUI.h"
#include "AccessToken.h"
#include "OperationUI.h"
#include "Result.h"
#include "User.h"

AuthUI::Login([] (Result result, AccessToken accessToken) {
    if (result.IsSuccessful()) {
        if (!result.userInfo.IsEmpty()) {
            TMap<FString, FString> userInfoMap = result.userInfo;
            FString userAction = userInfoMap.FindRef(TEXT("userAction"));
            if (userAction == TEXT("sanction")) {
                //Sanction handling
            }
        }
    } else {
        if (result.IsServerError()) {
            OperationUI::HandleResult(result, [result] (Result operationResult){
                //2.9.x and below: Actual error code is returned in errorCode
                if (result.errorCode == 44008 || result.errorCode == 45006) { Auth::Logout(); }
                if (result.errorCode == 44010) { Auth::Logout(); }

                //3.0.0 and above: Mashup wrapping error (60000 range) returns the actual error code in origin_code
                FString originCode = result.userInfo.FindRef(TEXT("origin_code"));
                if (!originCode.IsEmpty()) {
                    //Refresh Token error (Token expired, must logout and delete local token)
                    if (originCode == TEXT("44010")) {
                        Auth::Logout();
                    }

                    if (originCode == TEXT("44008") || originCode == TEXT("45006")) {
                        Auth::Logout();
                    }
                }
            });
        } else if(result.IsCanceled()) {
            AccessToken accessToken = Auth::GetAccessToken();
            if (!accessToken.IsNull()) {
                //Retry automatic or manual login
            }
        } else {
            OperationUI::HandleResult(result, [] (Result operationResult) { });
        }
    }
});

=== "Android (Kotlin)"

kotlin
fun login(activity: Activity) {
    AuthUI.login(activity) { result, accessToken ->
        when {
            result.isSuccessful() -> {
                //Check for sanctioned user (=case handled directly in game)
                if(result.userInfo == AuthUI.Sanctioned) {
                    //Apply according to game scenario, such as logout or restart
                    return@login
                }

                //Move to screen after login
                val token = accessToken!!.token //AccessToken
                val user = accessToken.user
                val memberNumber: Long = user.memberNumber
                val verifiedIdentity: Boolean = user.verifiedIdentity
                val nationality: String = user.nationality
                val isGuest: Boolean = user.isGuest()
                val providers = user.providerUsers
                for (provider in providers) {
                    val type: Int = provider.type //1:StoveEmail, 2:Facebook, 3:Twitter, 6:Naver, 9:Google, 12:Apple, 13:Line, 15:Steam
                    val userId: String = provider.userId
                    val email: String? = provider.email
                    val verifiedEmail: Boolean? = provider.verifiedEmail
                }
            }
            result.isCanceled() -> {
                //User canceled, stay on login screen
            }
            result.isServerError() -> {
                OperationUI.handleResult(activity, result) {
                    //2.9.x and below: Actual error code is returned in errorCode
                    if (result.errorCode == 44008 || result.errorCode == 45006) {
                        Auth.logout(activity)
                    }

                    //3.0.0 and above: Mashup wrapping error (60000 range) returns the actual error code in origin_code
                    result.userInfo?.get("origin_code")?.let { originCode ->
                        if (originCode == "44008" || originCode == "45006") {
                            Auth.logout(activity)
                        }
                    }
                }
            }
            else -> {
                OperationUI.handleResult(activity, result) { }
            }
        }
    }
}

=== "Android (Java)"

java
public void login(@NotNull final Activity activity) {
    AuthUI.login(activity, (@NotNull Result result, @Nullable AccessToken accessToken) -> {
        if (result.isSuccessful()) {
            Map<String, String> userInfo = result.getUserInfo();
            if(userInfo != null && userInfo.containsKey("userAction")) {
                String userAction = userInfo.get("userAction");
                if(userAction != null && userAction.equals("sanction")) {
                    return null;
                }
            }
            String token = accessToken.getToken();
            User user = accessToken.getUser();
            long memberNumber = user.getMemberNumber();
            boolean verifiedIdentity = user.getVerifiedIdentity();
            String nationality = user.getNationality();
            boolean isGuest = user.isGuest();
            List<ProviderUser> providers = user.getProviderUsers();
            for (ProviderUser provider : providers) {
                int type = provider.getType();
                String userId = provider.getUserId();
                String email = provider.getEmail();
                boolean verifiedEmail = provider.getVerifiedEmail();
            }
        } else if (result.isCanceled()) {
            //User cancellation
        } else if (result.isServerError()) {
            OperationUI.handleResult(activity, result, (@NotNull Result it) -> {
                //2.9.x or lower: Actual error code is returned as errorCode
                if (result.getErrorCode() == 44008 || result.getErrorCode() == 45006) {
                    Auth.logout(activity);
                }

                //3.0.0 or higher: Mashup wrapping error (60000 range) returns actual error code as origin_code
                Map<String, String> userInfo = result.getUserInfo();
                String originCode = userInfo != null ? userInfo.get("origin_code") : null;
                if ("44008".equals(originCode) || "45006".equals(originCode)) {
                    Auth.logout(activity);
                }
                return null;
            });
        } else {
            OperationUI.handleResult(activity, result, (@NotNull Result it) -> null);
        }
        return null;
    });
}

=== "iOS"

objectivec
[SGSAuthUI loginWithFromViewController:nil completionHandler:^(SGSResult * _Nonnull result, SGSAccessToken * _Nullable accessToken) {
    if (result.isSuccessful) {
        NSString *userAction = [result.userInfo objectForKey:@"userAction"];
        if ([userAction isEqualToString:@"sanction"]) {
            return;
        }

        NSString *token = accessToken.token;
        SGSUser *user = accessToken.user;
        NSNumber *memberNumber = user.memberNumber;
        BOOL verifiedIdentity = user.verifiedIdentity;
        NSString *nationality = user.nationality;
        BOOL isGuest = user.isGuest;
        NSArray *providers = user.providerUsers;
        for (SGSProviderUser *providerUser in providers) {
            int type = providerUser.type;
            NSString *userId = providerUser.userId;
            NSString *email = providerUser.email;
            BOOL verifiedEmail = providerUser.verifiedEmail;
        }
    } else if (result.isCanceled) {
        //User cancellation
    } else if (result.isServerError) {
        [SGSOperationUI handleResult:result fromViewController:self completionHandler:^(SGSResult * _Nonnull result) { }];
    } else {
        [SGSOperationUI handleResult:result fromViewController:self completionHandler:^(SGSResult * _Nonnull result) { }];
    }
}];

ErrorCodes

!info
명확한 조치가 있는 케이스

  • 30001 AuthConfigurationError: client_id·service_id가 null/빈 값이에요. SDK 초기화 호출 전에 파트너스에서 발급받은 키가 올바르게 설정됐는지 확인하세요.
  • 44010 Invalid refresh token: 저장된 refresh token이 만료/무효예요. 토큰을 폐기하고 로그인 화면으로 유도해 신규 발급받으세요.
  • 44009 Password has been changed: 비밀번호 변경 이후 기존 토큰이 무효예요. 토큰을 폐기하고 재로그인 흐름으로 유도하세요.
  • 30302 ServerError (단말기 시간 변경): 이용자가 디바이스 시간을 임의로 변경한 케이스예요. 시간 설정을 자동으로 되돌리도록 안내하세요.
  • 3.0.0 이상 에러 코드 확인 방식 변경: 서버 에러가 매시업 래핑 에러(60000번대)로 내려오고, 실제 에러 코드(44008·44010 등)는 userInfo의 origin_code로 전달돼요. 2.9.x 이하는 기존처럼 ErrorCode로 확인해요.
DomainErrorCodeDescription
com.stove.success0Success
com.stove.auth30001AuthConfigurationError : Check constants server : client_id and service_id are null or empty
com.stove.server43000ID or PW is incorrect.
com.stove.server43104Game restrict member
com.stove.server10125Error : It works only on normal devices. If this error persists, please contact Customer Service.
com.stove.server49500blocked IP address
com.stove.server41002Invalid game id
com.stove.server44001Withdrawal request member
com.stove.server44002Withdrawal member
com.stove.server44008Already Stove Account Link.
com.stove.server44010Invalid refresh token
com.stove.server41001Invalid client id
com.stove.server44000Sleep member
com.stove.server44009Password has been changed. Please login again.
com.stove.server30302ServerError — 이용자가 단말기 시간을 임의로 변경해서 플레이하는 경우 발생
com.stove.base.network10001NoConnectionError
com.stove.base.network10002TimeoutError



게스트로 시작 (Unity · Unreal 3.0.0 이상)

3.0.0 부터 Unity · Unreal 은 게임 화면의 게스트 시작 버튼에서 바로 게스트로 시작할 수 있는 AuthUI.GuestStart 를 제공해요. SDK 약관 동의 화면을 띄우고, 이용자가 동의한 약관으로 게스트 가입과 로그인까지 한 번에 처리해요. 2.9.x 처럼 통합 로그인(AuthUI.Login) 화면에서 게스트로 시작하는 방식도 그대로 쓸 수 있어요.

=== "Unity"

csharp
AuthUI.GuestStart((Result result, AccessToken accessToken) =>
{
    if (result.IsSuccessful)
    {
        /** Guest login successful → Perform post-login tasks such as character setup (setGameProfile) **/
    }
    else if (result.IsCanceled)
    {
        /** Terms agreement screen closed → Stay on start screen **/
    }
    else
    {
        OperationUI.HandleResult(result, (Result operationResult) => { });
    }
});

=== "Unreal"

cpp
#include "AuthUI.h"
#include "OperationUI.h"
#include "AccessToken.h"
#include "Result.h"

AuthUI::GuestStart([] (Result result, AccessToken accessToken) {
    if (result.IsSuccessful()) {
        /** Guest login successful → Perform post-login tasks such as character setup (setGameProfile) **/
    } else if (result.IsCanceled()) {
        /** Terms agreement screen closed → Stay on start screen **/
    } else {
        OperationUI::HandleResult(result, [] (Result operationResult) { });
    }
});



4. 캐릭터 설정 (setGameProfile)

로그인 완료 이후 이용자의 캐릭터 및 월드 정보를 입력해요. 입력된 정보는 각 기능(쿠폰/팝업/빌링/푸시)에서 월드·캐릭터별로 구분해 사용돼요. 게임 프로필의 유효성은 SDK가 별도로 검사하지 않으므로 입력 시 null 체크를 꼭 해주세요.

!danger
캐릭터 설정 작업은 필수예요
캐릭터 설정 작업을 하지 않으면 스토브 백오피스를 통해 설정한 기능(쿠폰/팝업/빌링/푸시)을 정상적으로 사용할 수 없어요.

사전 준비:

  • 스토브 IAP·쿠폰 서비스를 사용하려면 파트너스에 World 정보가 사전 등록되어 있어야 해요.
  • 월드 미지원 게임이라도 default로 최소 1개 world 지정이 필요해요.

월드 지원 게임

=== "Unity"

csharp
private void SetGameProfile()
{
    string CharacterNumber = "setYourCharacterNumber";
    string WorldId = "setYourWorld";
    AccessToken accessToken = Auth.AccessToken;
    if(accessToken == null) { return; }
    accessToken.User.GameProfile = new GameProfile(CharacterNumber, WorldId);
}

=== "Unreal"

cpp
#include "Auth.h"
#include "AccessToken.h"
#include "GameProfile.h"

FString world = "setYourWorld";
int64 chracternumber = "setYourCharacterNumber";

GameProfile gameProfile = GameProfile(chracternumber, world);

AccessToken accessToken = Auth::GetAccessToken();
if (!accessToken.IsNull()) {
    accessToken.user.SetGameProfile(gameProfile);
}

=== "Android (Kotlin)"

kotlin
private fun setGameProfile() {
    val characterNumber = "setYourCharacterNumber"
    val worldId = "setYourWorld"
    // Please ensure to validate (null check) the characterNumber and world values.
    Auth.accessToken?.user?.gameProfile = GameProfile(characterNumber, worldId)
}

=== "Android (Java)"

java
private void setGameProfile(@NotNull Context context) {
    Long characterNumber = 111L; // setYourCharacterNumber
    String world = ""; // setYourCharacterWorld
    // Please ensure to validate (null check) the characterNumber and world values.
    AccessToken accessToken = Auth.getAccessToken();
    if (accessToken != null) {
        User user = accessToken.getUser();
        user.setGameProfile(context, new GameProfile(characterNumber, world));
    }
}

=== "iOS"

objectivec
NSString *characterNumber = @"setYourCharacterNumber";
NSString *worldId = @"setYourWorld";
SGSAccessToken *accessToken = [SGSAuth accessToken];
if(accessToken == nil) { return; }
SGSGameProfile *gameProfile = [[SGSGameProfile alloc] initWithCharacterNumber:characterNumber world:worldId];
[[accessToken user] setGameProfile:gameProfile];

월드 미지원 게임

월드를 지원하지 않는 게임이라도 characterNumber만 설정하면 돼요. world 인자는 null로 전달해요. 단, 파트너스에는 default world가 1개 이상 등록되어 있어야 해요.


=== "Unity"

csharp
private void SetGameProfile()
{
    string CharacterNumber = "setYourCharacterNumber";
    AccessToken accessToken = Auth.AccessToken;
    if (accessToken == null) { return; }
    accessToken.User.GameProfile = new GameProfile(CharacterNumber);
}

=== "Unreal"

cpp
#include "Auth.h"
#include "AccessToken.h"
#include "GameProfile.h"

int64 chracternumber = "setYourCharacterNumber";

GameProfile gameProfile = GameProfile();
gameProfile.characterNumber = chracternumber;

AccessToken accessToken = Auth::GetAccessToken();
if (!accessToken.IsNull()) {
    accessToken.user.SetGameProfile(gameProfile);
}


<br><br>

=== "Android (Kotlin)"

```kotlin
private fun setGameProfile() {
    val characterNumber = "setYourCharacterNumber"
    // characterNumber 값의 유효성 체크(null)를 꼭 해주세요.
    Auth.accessToken?.user?.gameProfile = GameProfile(characterNumber, null)
}

=== "Android (Java)"

java
private void setGameProfile(@NotNull Context context) {
    Long characterNumber = 111L;
    AccessToken accessToken = Auth.getAccessToken();
    if (accessToken != null) {
        User user = accessToken.getUser();
        user.setGameProfile(context, new GameProfile(characterNumber, null));
    }
}

=== "iOS"

objectivec
NSString *characterNumber = @"setYourCharacterNumber";
SGSAccessToken *accessToken = [SGSAuth accessToken];
if(accessToken == nil) { return; }
SGSGameProfile *gameProfile = [[SGSGameProfile alloc] initWithCharacterNumber:characterNumber world:nil];
[[accessToken user] setGameProfile:gameProfile];

SDK Token Management

The SDK automatically renews the AccessToken when it reaches 80% of its expiration time.
Since automatic renewal only works while the process is running, you must always query and use the AccessToken.

=== "Unity"

csharp
public void GetToken()
{
    string token = Auth.AccessToken.Token;
}

=== "Unreal"

cpp
#include "Auth.h"
#include "AccessToken.h"

AccessToken accessToken = Auth::GetAccessToken();

if (!accessToken.IsNull()) {
    FString token = accessToken.token;
}



=== "Android (Kotlin)"

kotlin
fun getAccessToken() {
    val token : String? = Auth.accessToken?.token
}

=== "Android (Java)"

java
public void getAccessToken() {
    AccessToken accessToken = Auth.getAccessToken();
}

=== "iOS"

objectivec
NSString *token = [[SGSAuth accessToken] token];

Implementing GPG Login

This is used when implementing a 1:1 account linkage between a PGS ID and a STOVE account for games preparing for the Google Play Games Service (GPG) launch. The SDK provides three APIs: Fetch (query linked account) / Load (load) / Link (link account).

!info
PGS ID ↔ STOVE Account 1:1 Policy
After the initial linkage, if you log in with a different STOVE account, it will overwrite the existing account information.
If a STOVE account change occurs, such as upgrading to a full member, you must call the GPG linkage again.

Prerequisites

API Console / Partners Tasks

  • Console Permission Request: Send the package name (Android) for each service environment to the publishing technical representative to request Google Allowlist (takes 1–2 days)
  • Private Key Generation: Issued from the Google Cloud Console. 생성 매뉴얼 PDF
  • STOVE Partners Registration: [파트너스] > [퍼블리싱 센터] > [게임 입점 관리] > [모바일 마켓 정보 관리] > [플레이스토어 마켓 앱] > [Private Key File 업로드]

SDK Module Application

  • play-services-games-v2 Library: A module officially released as of 2023/09/18. Manual EAP application is no longer required. Google 공식 다운로드
  • AUTH-GooglePlayGames Module: STOVE SDK GPG linkage module. latest live version Required for use

Project ID Settings (Android)

  1. Google Play Console Select your app in
  2. Play 게임서비스 > 설정 및 관리 > 설정 Check the project ID in
  3. Apply to the files below

=== "build.gradle"

groovy
repositories {
    google()
    jcenter()
    maven {
        url "https://externalnexus.iam0.com/repository/mvp"
        // Android Gradle Plugin 7.0 이상 사용 시 아래 옵션 추가
        allowInsecureProtocol = true
    }
    mavenCentral()
}

dependencies {
    implementation 'com.stove:auth-googleplaygames:2.8.1'
}

=== "strings.xml"

xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="google_play_games_project_id" translatable="false">{your_project_id}</string>
</resources>

=== "AndroidManifest.xml"

xml
<manifest>
    <application>
        <meta-data
            android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/google_play_games_project_id"/>
    </application>
</manifest>

Project ID Settings (Unity / Unreal)

  • Unity: Stove > Edit Settings → Use Auth-GooglePlayGames Check → Projectid Enter google_playgames_projectid in
  • Unreal: 프로젝트 셋팅 > Android > GooglePlayServices > 게임 앱 ID Enter

Development Flow

  1. PGS SignIn and obtain recallSessionID (CP implementation area): After processing Google Play Games v2 SignIn, obtain the recallSessionID, which is the unique PGS identifier. Refer to Google 공식 가이드 for how to obtain it for each language.
  2. SDK Initialization + Provider Settings: Call Auth.initialize, AuthUI.setProviders in the same way as the existing integrated login flow.
  3. Automatic Login Branching:
    • Auth.AccessToken Exists → Proceed with existing automatic login flow (no separate GPG processing required)
    • Auth.AccessToken Does not exist → Query the STOVE account linked via GPGProvider(recallSessionID).fetch()
  4. Query Result Branching:
    • No linked account → Enter guest start or integrated login screen
    • Linked account exists + Game direct UI → Create GPGProvider(recallSessionID, account) → Auth.Login(provider)
    • Linked account exists + SDK provided UI → GPGProvider.load() → Auth.login(loadedProvider)
  5. Account Linkage (Link): After login is complete, at an appropriate time (e.g., entering the lobby, returning to account settings), link the PGS ID and STOVE account with AccessToken.User.Link(GPGProvider). Must be called again when upgrading to a full member.

Full Linkage Sequence

This is a diagram representing the entire flow of PGS SignIn → obtaining recallSessionID → querying linked account, logging in, and linking.

!info
※1 Linkage follows a 1:1 policy, and the list of linked accounts is at most 1.
※2 Only applicable if the user configures the optimized UI directly in the game.```mermaid
sequenceDiagram
autonumber

participant Z as User
participant A as Game
participant B as Stove SDK
participant C as Stove Server
participant D as Google

Z ->> A: 게임 실행
A ->> A: recallSessionID 획득
A ->> A: SDK 초기화
A ->> A: AuthUI.setProviders(providers)

alt IF AccessToken 있음
A ->> B: AuthUI.login()
B ->> C: 자동로그인
C -->> B: 로그인 결과
B -->> A: AccessToken
A ->> Z: TOUCH TO START — 로그인 완료
else ELSE AccessToken 없음
A ->> A: GPGProvider(recallSessionID) 생성
A ->> B: GPGProvider.fetch()
B ->> C: 연결된 계정 조회(recallSessionID)
C ->> D: Recall API
D -->> C: 저장된 계정 목록
C -->> B: 연결된 계정 목록
B -->> A: 연결된 계정 목록

alt 연결 계정 없음
A ->> Z: 게스트 시작 / 통합 로그인 화면 (수동 로그인)
else 연결 계정 있음 + 게임 직접 UI (※2)
A ->> A: 캐릭터 상세정보 취합 후 선택 화면 노출
alt 사용자가 연결 계정으로 로그인 선택
A ->> A: GPGProvider(recallSessionID, account) 생성
A ->> B: Auth.Login(GPGProvider)
B ->> C: 로그인(UserInfo)
C -->> B: 로그인 결과
B -->> A: AccessToken
A ->> Z: TOUCH TO START — 로그인 완료
else 취소
Z ->> A: 취소 선택
A ->> Z: 게스트 시작 / 통합 로그인 화면
end
else 연결 계정 있음 + SDK 제공 UI
A ->> A: GPGProvider(recallSessionID) 생성
A ->> B: GPGProvider.load()
B -->> Z: 선택 화면 노출
alt 불러오기 선택
Z ->> B: 불러오기 선택
B -->> A: loadedProvider
A ->> B: Auth.login(loadedProvider)
B ->> C: 로그인(UserInfo)
C -->> B: 로그인 결과
B -->> A: AccessToken
A ->> Z: TOUCH TO START — 로그인 완료
else 새로 시작하기
Z ->> A: 취소 선택
A ->> Z: 게스트 시작 / 통합 로그인 화면
end
end
end

text

<br>**Fetch — Retrieve Linked Accounts**`recallSessionID`Retrieves the list of STOVE accounts linked to the corresponding PGS ID from the STOVE server.<br>=== "Unity"    ```csharp
    public void googlePlayGamesFetch(string sessionId)
    {
        GPGProvider provider = new GPGProvider(sessionId); // recallSessionId
        provider.Fetch((Result result, List<Dictionary<string, object>> accounts) =>
        {
            if (result.IsSuccessful)
            {
                // accounts : 계정 목록
            }
        });
    }
cpp
# include "Auth.h"
# include "GPGProvider.h"
# include "Result.h"

GPGProvider* provider = new GPGProvider(googleGameSessionId);
provider->Fetch([] (Result result, list<map<string, string>> accounts) {
    if (result.IsSuccessful()) {
        // accounts : 계정 목록
    }
});

Load — Load linked accounts

Fetch Prepare the Provider so that after the user selects an account from the account information received as a result via the SDK-provided UI, they can automatically log in with that account. Pass the returned loadedProvider to the Auth.login.


csharp
public void googlePlayGamesLoad(string sessionId, Dictionary<string, object> account)
{
    /** account → Fetch의 결과로 얻은 계정 목록에서 획득 **/
    GPGProvider provider = new GPGProvider(sessionId); // recallSessionId
    provider.Load(account, (Result result, GPGProvider loadedProvider) =>
    {
        if (loadedProvider != null) {
            Auth.Login(loadedProvider, (Result loginResult, AccessToken accessToken) => {
                if (loginResult.IsSuccessful) {
                    // 로그인 성공
                } else if (loginResult.IsServerError) {
                    OperationUI.HandleResult(loginResult, (Result operationResult) =>
                    {
                        // 게스트 자동 로그인 불가 케이스
                        //2.9.x 이하 : 실제 에러 코드가 ErrorCode 로 내려온다
                        if (loginResult.ErrorCode == 44008 || loginResult.ErrorCode == 45006) {
                            Auth.Logout();
                        }

                        //3.0.0 이상 : 매시업 래핑 에러(60000대)는 실제 에러 코드가 origin_code 로 내려온다
                        if (loginResult.UserInfo != null && loginResult.UserInfo.TryGetValue("origin_code", out string originCode))
                        {
                            if (originCode == "44008" || originCode == "45006")
                            {
                                Auth.Logout();
                            }
                        }
                    });
                }
            });
        }
    });
}

Link — Link account

After login is complete, link the PGS ID with the current Stove account at an appropriate time. If a conversion to a full member occurs, you must call it again to maintain the link.


csharp
public void googlePlayGamesLink(string sessionId)
{
    GPGProvider provider = new GPGProvider(sessionId); // recallSessionId

    AccessToken accessToken = Auth.AccessToken;
    if (accessToken == null) { return; }
    accessToken.User.Link(provider, (Result result) =>
    {
        if (result.IsSuccessful)
        {
            // Google Play Games 연결 성공
        }
    });
}

Troubleshooting

SituationCauseSolution
GPG connection is disconnected after converting to a full memberThe PGS ID ↔ STOVE account relationship follows a 1:1 policy. When a STOVE account is converted to a full member, the existing PGS connection must also be updated to function correctly.Immediately after the full member conversion is complete, AccessToken.User.Link(GPGProvider(recallSessionID)) call it again.

Google Console API Settings

This is how to register IAP (In-App Purchase) information for apps released on Google Play to STOVE Partners Billing. Since IAP authentication for STOVE SDK V2 uses Google's OAuth client method, Google Android Publisher API connection is required.

Perform Google Play Console tasks using the Owner (Master) account.
If you proceed with an account that has different permissions, some menus may be blocked, causing the task to stop.

The workflow consists of the following 4 steps.

  1. Connect Google Play Console API access permissions
  2. Create a Google Cloud project and configure API/OAuth
  3. Obtain a Refresh Token from OAuth 2.0 Playground
  4. Enter issuance information into STOVE Partners Billing settings

1. Obtain Google Play Console API access permissions

Connect to the Google Android Publisher API to verify apps registered on Google Play and IAP payments.

If the connected project status does not appear on the screen, check the connection with Google Cloud first. If the problem persists after configuration, refer to the official Google guide.


2. Create a Google Cloud project

Only proceed in the project connected to the actual service app (Service Project).
If you work in a test project, live billing verification will not work.


2-1) Create project

  1. Google Cloud ConsoleAccess. The login account must be the Google Play Console developer account owner.
  2. IAM 및 관리자 > 프로젝트 만들기Select.
  3. Enter the project name and location to create the project.

2-2) Add API to use in project (Play Android Developer API)

  1. After selecting the created project, go to API 및 서비스 > 라이브러리Go to.
  2. Search for and select Play Android Developer API, and set it to 사용 in the product details.

It must be enabled in the same project connected to the Play Console's API 액세스.
For IAP verification, Google Play Android Developer API must be enabled.


2-3) Configure OAuth consent screen and create OAuth client ID

  1. Select the project to link in the API 및 서비스 dashboard.
  2. In the 사용자 인증 정보 menu, select 사용자 인증 정보 만들기 > OAuth 클라이언트 ID.

You can also check the values on the OAuth client information screen or in the downloaded client JSON.

For detailed OAuth setup instructions, please refer to the Google OAuth2 Guide.


3. Generate Refresh Token (OAuth 2.0 Playground)

  1. Go to Google OAuth 2.0 Playground.
  2. Click the gear icon in the top right corner of the screen to open the OAuth 2.0 Configuration panel, and check the Use your own OAuth credentials checkbox.
  3. Enter the OAuth Client ID and OAuth Client Secret issued in the previous step, respectively.
  4. Select Step 1 in the Google Play Android Developer API area on the left, or enter https://www.googleapis.com/auth/androidpublisher directly into the scope input field at the bottom.
  5. Click the Authorize APIs button in the bottom left.
  1. After authentication is complete, when the screen switches to Step 2, click the Exchange authorization code for tokens button. You can check the Refresh token value in the response area.

4. Enter Information in Stove Partners Billing Settings

Enter the following 3 values issued in the steps above into Manage IAP Information by Market in Stove Partners.

  • OAuth Client ID

  • OAuth Client Secret

  • Refresh Token

FAQ



Q1. Should I choose the Integrated Login UI or the Direct Login (DATA API) method?
A. We recommend the Integrated Login UI (Auth.UI) method for a quick and easy implementation of authentication.
If you need to configure the login screen directly in your game or selectively use specific providers, you can use the Direct Login (DATA API) method.
Q2. How do I configure login for a multi-platform (Mobile + PC + Web) game?
A. You integrate the login module separately for each platform.
Use the Mobile SDK for Mobile, PC SDK + STOVE PC Client for PC, and GNB or login URL method for Web.
Since the STOVE member identifier (member_no or guid) is the same regardless of the platform, account continuity is maintained, and the game server can process tokens from any environment using the same verification API.
Q3. When should I set the GameProfile?
A. You must complete the character setup after login is finished and before entering the game lobby.
If not set, features configured through the STOVE back office, such as coupons, pop-ups, billing, and push notifications, will not function properly.
Even if you initialize the SDK or re-initialize it after clearing it, you must call the setGameProfile API to reset the game's world and character information.
Q4. How should I manage the accessToken?
A. The SDK automatically renews the accessToken when its expiration time reaches 80%.
Since automatic renewal only works while the process is running, you should always retrieve and use the accessToken.
You must also verify the token validity on the server side when requesting authentication from the server after login.
Q5. How do I convert a guest login to a full member account?
A. You can link a guest account to a full member account by calling AuthUI.link(Integrated UI) or Auth.accessToken?.user?.link(DATA API).
We recommend calling this only for guest accounts; if it is not a guest account, 'Link Channel' will be displayed.
Q6. How do I change the display order of providers on the login screen?
A. AuthUI.setProviders() They are displayed on the login screen in the order of the provider list passed when calling.
The screen may change depending on the order in which you add the provider list.
The email provider must be added.
Q7. How do I add Apple login on iOS?
A. Sign in with Apple is supported from iOS 13 and above and is a 3rd party authentication that must be applied for App Store release.
You must create Services IDs in Apple Developer, set the Redirect URL, and add the Sign in with Apple Capability in Xcode.
For Unreal, if you add Config/DefaultEngine.ini to the bEnableSignInWithAppleSupport=True file, the Capabilities will be set automatically.
Q8. How do I issue a Refresh Token for Google IAP integration?
A. You can issue it in the Google Developers OAuth 2.0 Playground.
In OAuth 2.0 Configuration, check "Use your own OAuth credentials", enter your OAuth Client ID and Client Secret, and
select the Play Android Developer API scope and click Authorize API.
In Step 2, click the "Exchange authorization code for tokens" button to obtain the Refresh Token.
Enter the issued information in STOVE Partners > Billing Settings.
Q9. What should I do if there is no account connected to GPG?
A. If there is no account connected to GPG, switch to the initial screen showing guest start or integrated login to proceed with manual login.
A 1:1 policy is applied to GPG login connections, and the list of connected accounts is limited to a maximum of 1.
If you are configuring the screen directly in the game using the Data API, you need to handle branching based on whether the account is connected.
Q10. How long is the validity period of the SSO temporary key (state)?
A. The validity period of the temporary key (=state) is 10 minutes, and it can only be used once.
Once the redirect is complete on the web token exchange page (/auth/token-exchange), the temporary key value expires immediately and cannot be reused.
You must obtain a new temporary key via the issuance API every time an SSO integration is required.
Q11. Are there any restrictions on the redirect_url for SSO integration?
A. redirect_url is limited to pages that can use the xxxx.onstove.com domain.
You must verify the SSO target page with the publishing technical manager before integration.
Also, since this is communication between the game server and the STOVE API server, infrastructure firewall settings must be completed in advance.



Do you have any inquiries?