Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 400 Unable to Parse JSON for Google OAuth #1079

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix 400 Unable to Parse JSON for Google OAuth #1079

wants to merge 1 commit into from

Conversation

ng5
Copy link

@ng5 ng5 commented May 8, 2017

Google response contains state field, server throws 400 - Unable to process JSON. adding this field to payload classes fixes the problem.

{"code":"","clientId":"**","redirectUri":"http://localhost:3000","state":"aeanx8630v"}

@futurechan
Copy link

I have a website that just went to production. I'm getting told iPhones are getting 400s when using Google auth. Is this related?

@ng5
Copy link
Author

ng5 commented Sep 8, 2017

error code is generated by application on server side and it can be anything 400 or 405. Underlying problem is additional field clientId. so if you're parsing oauth response from google without considering this additional field your code will fail. Error code is less important, it's really upto to what you implement on server side when parsing fails.

@futurechan
Copy link

It appears this is isolated to Safari on iOS. I'm still investigating.

@ng5
Copy link
Author

ng5 commented Sep 8, 2017

additional field name is "state" as shown in the pull request. Pull request only fixes java server backend, if you're using another server technology, then you will have to patch it accordingly. Pull request fixes the problem on server side, it has nothing to do with browser. So your issue is not related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants