1
votes

When I use the following URI for the Google OAuth request I get error below:

"Realm didn't match redirect_uri/origin. Error code: 2".

Can anyone tell me what I am doing wrong?

https://accounts.google.com/o/oauth2/auth?client_id=client_id_copied_from_the_developer_console&response_type=code&scope=openid%20email&redirect_uri=https://mysite.your-now.com/oauth2callback&state=security_token%3D138r5719ru3e1%26url%3Dhttps://mysite.your-now.com/navpage.do&[email protected]&openid.realm=your-now.com&hd=your-now.com

1
Did you register that uri with your project in google developer console? If you didn't, google won't let responses be redirected there as a security measure.autoKarma
I did register it in the Developer Console under API's & Auth -> Credentials. But it doesn't work.Mz. Mitch

1 Answers

0
votes

The realm value you are providing as openid.realm is malformed.

More specifically, the openid4java match method is failing with a MALFORMED_REALM result. Make sure you are providing a valid url as realm!

Hope that helps.