3.1. Logout example
3.1. Logout example
3.1.1. Example of Logout
When you call the API using the basic logout UI, the following window will appear asking if you really want to continue logout.
|
|
---|---|
|
|
Logout API by IDP is provided in case a developer wants to implement its own logout UI (i.e. a developer does not want to use the basic logout UI).
3.1.2. Logout using the basic logout UI
The following is an example of logout using the basic logout UI.
Unity
using Kakaogame.SDK;
// Logout using the basic logout UI
KGSession.Logout(
(result) => {
if (result.isSuccess) {
// Logout successful
// [TODO] Return to Start page
}
else {
// Logout failed
}
}); |
Android
// Logout using the basic logout UI
KGSession.logout(activity, new KGResultCallback<Void>() {
@Override
public void onResult(KGResult<Void> result) {
if (result.isSuccess()) {
// Logout successful
// [TODO] Return to Start page
} else {
// Logout failed
}
}
}); |
iOS
#import <KakaoGame/KakaoGame.h>
// Logout using the basic logout UI
[KGSession logoutWithCompletionHandler:^(NSError *error) {
if (IS_SUCCESS(error) == YES)
{
// Logout successful
// [TODO] Return to Start page
}
else
{
// Logout failed
}
}]; |
Windows Sync
Windows Async
Unreal
3.1.3. Logout not using the basic login UI
The following is an example of logout not using the basic logout UI.
Unity
Android
iOS
Windows Sync
Windows Async
Unreal