You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, can we have a way of knowing if the Google auth is cancelled?
Right now, it just throws a generic Exception with a message:
"Error Domain=com.google.GIDSignIn Code=-5 "The user canceled the sign-in flow." UserInfo={NSLocalizedDescription=The user canceled the sign-in flow.}"
The text was updated successfully, but these errors were encountered:
@trevoriancox this is how I authenticate with Google:
try
{
OAuthApi api = ...
api.ResetData();
var account = await api.Authenticate();
if (!account.IsValid())
{
return new DataResponse<AuthResponse>
{
ErrorType = HttpErrorType.Authentication
};
}
var authAccount = account as OAuthAccount;
}
catch (Exception ex)
{
if (ex is TaskCanceledException)
{
return new DataResponse<AuthResponse>
{
ErrorType = HttpErrorType.Cancelled
};
}
// TODO hack. wait for the issue to be fixed
// https://github.com/Clancey/SimpleAuth/issues/101
if (ex.Message.Contains("com.google.GIDSignIn Code=-5"))
{
...
}
...
}
It does not go into if (ex is TaskCanceledException) part when I cancel the sign-in flow since I'm always receiving a generic type Exception where I need to make a hack.
Hi, can we have a way of knowing if the Google auth is cancelled?
Right now, it just throws a generic Exception with a message:
The text was updated successfully, but these errors were encountered: