GTMAppAuth icon indicating copy to clipboard operation
GTMAppAuth copied to clipboard

App crashes after sign-in with Google

Open foreceipt opened this issue 7 years ago • 3 comments

For at least one user using AppAuth iOS with Google as the IdP, an exception is being raised when extracting the ID Token.

It appears decodeData is unexpectedly nil:

NSData *decodedData = [[NSData alloc] initWithBase64EncodedString:body options:0];

decodedData is nil

https://github.com/google/GTMAppAuth/blob/2eb382fd62c727026e3816db51e6c6da4105ebb5/Source/GTMAppAuthFetcherAuthorization.m#L238-L268

foreceipt avatar Jun 07 '18 15:06 foreceipt

John, I have edited your issue comment so that it is a general description of a possible bug with AppAuth.

As an open source community we encourage everyone to submit PRs to fix issues, especially if they already know the cause of the underlying issue.

Someone, perhaps William, perhaps someone else, will look at the issue. Though, if you are already aware of the fix, you will get much faster attention if you also submit a corresponding PR.

If you are uncertain as to the proper fix for one reason or another, this is a good place to have the discussion about what the proper fix is.

But this is not a “task list” for assigning issues to individuals.

Thanks for understanding.

FWIW, I will sync with him on this and we’ll try to get back to you.

Thanks,

Steve

StevenEWright avatar Jun 07 '18 16:06 StevenEWright

Thanks Steve! I could fix it but not sure the root cause, that's why I came here to ask:) Here attached is the crash for your reference... image

foreceipt avatar Jun 07 '18 20:06 foreceipt

ID token parsing is now done with AppAuth's OIDIDToken class which is more cautious. Are you still seeing this crash?

petea avatar Oct 05 '20 22:10 petea