Google Sign-In returns unknown error if the user cancels on the permissions page

433 Views Asked by At

I'm using Google Sign-In on iOS. The login flow will show (at least) two views. First, the user is prompted for email & password. On the second, the user is prompted to accept some permissions, like "View your email address" and "View your basic profile info".

If the user hits cancel on the first view, the didSignInForUser callback gets the expected error code, that the user cancelled.

However, if the user hits cancel on the second view, when prompted for permissions, the didSignInForUser callback gets an unknown error. Specifically, code -1 and the localized description is "Unknown error".

Is that expected? And if so, is there a good way to detect that this unknown error is in fact a known error, that the user hit cancel?

0

There are 0 best solutions below