Auth0.Android
Auth0.Android copied to clipboard
Add PAR (Pushed Authorization Request) support
adds support for Pushed Authorization Request (PAR) flows where the backend-for-frontend (BFF) handles the /par and /token endpoints while the SDK manages the browser-based authorization.
Usage
// Callback style
WebAuthProvider.authorizeWithRequestUri(account)
.start(context, requestUri, object : Callback<AuthorizationCode, AuthenticationException> {
override fun onSuccess(result: AuthorizationCode) {
// Exchange result.code for tokens via BFF
}
override fun onFailure(error: AuthenticationException) {
// Handle error
}
})
// Coroutines
val authCode = WebAuthProvider.authorizeWithRequestUri(account)
.await(context, requestUri)
// Exchange authCode.code for tokens via BFF