Redirect user from native android to gmail autho0

Hello ,
I am trying to support native logic in android/ios
however it seems no way , but
Current flow for gmail(sso) login
app → author unverisal page → gmail → gmail page

is there any way to support flow like
app → Gmail page

Hi @huthefa.alfararjeh ! Assuming that by “gmail” you mean “Google account”, you can set the connection parameter in the authorization request to bypass the Auth0 login page and go directly to the specified connection.

Android:

WebAuthProvider.login(account)
    .withConnection("google-oauth2")
    .start(this, callback)

Swift:

Auth0
    .webAuth()
    .connection("google-oauth2")
    .audience("your_api_identifier")
    .start { result in
        switch result {
        case .success(let credentials):
            print("Obtained credentials: \(credentials)")
        case .failure(let error):
            print("Failed with \(error)")
        }
    }
1 Like

Thanks for helping on this one Nico!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.