Skip to content

Instantly share code, notes, and snippets.

@iamcodder
Created July 10, 2022 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamcodder/8f1ba43c6c8409aa8ea487b02107041b to your computer and use it in GitHub Desktop.
Save iamcodder/8f1ba43c6c8409aa8ea487b02107041b to your computer and use it in GitHub Desktop.
class LoginHelper(private val context: Context) : BaseLogin() {
override fun init() {
AGConnectInstance.initialize(context)
}
override fun getLoginIntent(): Intent {
val authParams: AccountAuthParams =
AccountAuthParamsHelper(AccountAuthParams.DEFAULT_AUTH_REQUEST_PARAM)
.setProfile()
.setEmail()
.setAuthorizationCode().createParams()
val service: AccountAuthService =
AccountAuthManager.getService(context, authParams)
return service.signInIntent
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment