loginWithProvider
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.
|
If the flow is performed through the web, then afer end-users have completed the OpenID flow, the ReachFive authorization server will redirect back to your application with an authorization code. Automatically complete the flow by calling onLoginActivityResult
in your activity’s onActivityResult
override.
Examples
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 ReachFive scope values 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)
}