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) })Content copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
open fun getSynchronousResult(context: Context, input: Unit): ActivityResultContract.SynchronousResult<SolidSignInResult>?
Link copied to clipboard