Android-SingleSignOn icon indicating copy to clipboard operation
Android-SingleSignOn copied to clipboard

sso doesn't report error if permission request is dismissed

Open David-Development opened this issue 6 years ago • 6 comments

If the user clicks outside the permission request dialog, the sso library doesn't return a proper error message.

David-Development avatar Dec 29 '18 20:12 David-Development

Is this still valid?

tobiasKaminsky avatar Jul 07 '20 13:07 tobiasKaminsky

It hasn't been implemented yet. To be honest i didn't miss it, but if @David-Development still needs this, it can be implemented either by

  • Directly displaying an Alert from the SSO library which says "You need to grant the permissions to use the SSO." or
  • throw an Exception similar to the AccountImportCancelledException (https://github.com/nextcloud/Android-SingleSignOn/issues/124 and https://github.com/nextcloud/Android-SingleSignOn/pull/129) (preferred)

stefan-niedermann avatar Jul 07 '20 14:07 stefan-niedermann

As this prevents sso from finishing, it is a good idea to throw AccountImportCancelledException :+1:

tobiasKaminsky avatar Jul 08 '20 10:07 tobiasKaminsky

Fine with it, just want to note that this was a breaking change because 3rd party clients which do not yet catch this exception at this place will break in case a user dismisses the permission

→ Requires a new major release

stefan-niedermann avatar Jul 08 '20 11:07 stefan-niedermann

I fully agree with Stefan. New major release and the Exceptions sounds great to me as well! 👍

@stefan-niedermann @tobiasKaminsky fyi: Probably this issue is also related to: https://github.com/nextcloud/Android-SingleSignOn/issues/202

If I press anywhere outside the message, the message disappears and a moving circle is shown for ever.

David-Development avatar Jul 10 '20 15:07 David-Development

As far as i can see, this has to be fixed in the Files app.

In the SSO lib AccountImporter#onActivityResult the result code RESULT_OK is given, but it should be RESULT_CANCELED. Then the wanted AccountImportCancelledException would be thrown.

I also wouldn't consider this a breaking change anymore because the method already throws AccountImportCancelledException since quite a long time.

@tobiasKaminsky Should i transfer this issue in the Files app repository or open a separate one?

stefan-niedermann avatar Nov 17 '21 15:11 stefan-niedermann