AuthorizeWithSolid

Signs the user in by launching Android Solid Services' account picker from your own activity, the way a system account chooser works.

This is the successor to SolidSignInClient.requestLogin: because your app launches the screen, nothing is drawn from a background service — Android Solid Services needs no overlay permission, and the whole SolidException.SolidServicesDrawPermissionDeniedException failure mode disappears. The picker also stays live while the user hops into Android Solid Services to sign in for the first time.

private val authorize = registerForActivityResult(AuthorizeWithSolid()) { result ->
when (result) {
is SolidSignInResult.Authorized -> onSignedIn(result.webId)
SolidSignInResult.Dismissed -> Unit
is SolidSignInResult.Failed -> show(result.exception)
}
}

SignInButton(onClick = { authorize.launch(Unit) })

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun createIntent(context: Context, input: Unit): Intent
Link copied to clipboard
open override fun parseResult(resultCode: Int, intent: Intent?): SolidSignInResult