login
Logs the user in with the external authentication provider.
Example Usage:
Gamebase.login(activity, AuthProvider.GOOGLE, new GamebaseDataCallback<AuthToken>() {
@Override
public void onCallback(AuthToken data, GamebaseException exception) {
if (Gamebase.isSuccess(exception)) {
Log.d(TAG, "Login successful");
} else {
Log.e(TAG, "Login failed");
}
}
});
Since
Added 1.4.0.
Parameters
The activity which is starting the login process.
The provider name witch is authentication provider.
Login result callback, returns the authentication token as a result of login.
See also
Logs the user in with the external authentication provider.
Example Usage:
Gamebase.login(activity, AuthProvider.GOOGLE, additionalInfo, new GamebaseDataCallback<AuthToken>() {
@Override
public void onCallback(AuthToken data, GamebaseException exception) {
if (Gamebase.isSuccess(exception)) {
Log.d(TAG, "Login successful");
} else {
Log.e(TAG, "Login failed");
}
}
});
Since
Added 1.4.0.
Parameters
The activity which is starting the login process.
The providerName which is authentication provider.
The additionalInfo which is additional information using for login.
Login result callback, returns the authentication token as a result of login.
See also
Logs the user in with the credential of external authentication provider.
Example Usage:
Map<String, Object> credential = new HashMap<>();
credential.put(AuthProviderCredentialConstants.PROVIDER_NAME, providerName);
credential.put(AuthProviderCredentialConstants.ACCESS_TOKEN, accessToken);
credential.put(AuthProviderCredentialConstants.ACCESS_TOKEN_SECRET, accessTokenSecret);
Gamebase.login(activity, credential, new GamebaseDataCallback<AuthToken>() {
@Override
public void onCallback(AuthToken data, GamebaseException exception) {
if (Gamebase.isSuccess(exception)) {
Log.d(TAG, "Login successful");
} else {
Log.e(TAG, "Login failed");
}
}
});
Since
Added 1.4.0.
Parameters
The activity which is starting the login process.
The credentialInfo which is credential of authentication provider.
Login result callback, returns the authentication token as a result of login.