okta-sdk-appauth-android
okta-sdk-appauth-android copied to clipboard
cancelIntent does not contain specific cause of error.
OktaManagementActivity is not forwarding the specific error to applications.
@Override
protected void onStart() {
super.onStart();
OAuthClientConfiguration config = OAuthClientConfiguration.getInstance(this);
if (config.hasConfigurationChanged()) {
signOut();
return;
}
// the stored AuthState is incomplete, so check if we are currently receiving the result of
// the authorization flow from the browser.
AuthorizationManagementResponse response =
AuthorizationManagementResponse.fromIntent(getIntent());
AuthorizationException ex = AuthorizationException.fromIntent(getIntent());
if (ex != null || response == null) {
Log.w(TAG, "Authorization flow failed: " + ex);
sendPendingIntent(mCancelIntent);
} else if (isLoginFlow(response)) {
runLoginFlow((AuthorizationResponse) response, ex);
} else {
sendPendingIntent(mCompleteIntent);
}
}
cancelIntent should attach the exception so the application can notify the user of the cause of the error.
Any update on this?
The callbacks are implemented by using pendingIntents and those can't be modified. So this isn't a simple fix we can put in quickly. We are looking at using onActivityResult and other methods.