¶ Quick start
Update Time: 2025-02-18 09:00:47
¶ Step 1: Create an Android project


Note: Minimum OS version is Android 7.0
¶ Step 2: Add dependency for Guard
make sure mavenCentral is present in project-level build.gradle:
buildscript {
repositories {
mavenCentral()
// other repositories
}
}
Add dependencies to the build.gradle file of the main project:
implementation 'cn.authing:guard:+'
¶ Step 3: Initialization
at app startup, call:
// context is application or initial activity
// ”appId“ is obtained from the Authing console
Authing.init(context, "appId");
Authing.setAuthProtocol(Authing.AuthProtocol.EOIDC);
Note:AUTHING_APP_ID application ID,not the user pool ID,Please go to the console (opens new window) first to obtain.
Please select authing_token
in Application Configuration-Authorization mode.
