A newer version of this documentation is available.

View Latest


client.loginWithProvider(name, scope, origin, activity)

About this command

Authenticate the user with a social provider (Facebook, Google…​).

Refer to the Android SDK Installation to initialize the providers at the client’s instantiation.

  • The provider scopes provided are the permissions setup in the provider’s configuration through the console.


import android.support.v7.app.AppCompatActivity
import com.reach5.identity.sdk.core.ReachFive

class MainActivity : AppCompatActivity() {
  // List the providers created on your ReachFive client
  val providers = ReachFive.getProviders()[0]
  // List of the scope assigned to the user
  val scope = setOf("openid", "email", "profile", "phone_number", "offline_access", "events", "full_write")

  client.loginWithProvider(providers[0].name, scope, "home", this)


name string

The name of the provider.

scope string[]

List of space-delimited, case-sensitive strings representing the requested scope.

Default scope is an empty list.

origin string

The origin of the call.

activity Activity

The Android activity.


Type: Unit