Wednesday, July 22, 2015

Goggle OAuth2 Authentication Module in OpenAM

I was configuring OAuth2 Authentication Module in OpenAM and trying to integrate with Google OAuth2 Provider.

I need the user profile and email from Google.  I know this has to be set in the Scope. So, I tried "profile, email".

But I kept getting the following error:

Error: invalid_scope 

Some requested scopes were invalid. {valid=[], invalid=[profile,]}

After I removed the comma, it works!

Very strange! I recalled the Scope for Facebook was email, read_stream. The hint is as follows:

The OAuth scope is a comma-separated list of values that define the type of information that can be retrieved from the user profile service. The values will depend on the type of permissions that the user has given to the user profile application in the OAuth 2.0 Provider.

Example: email, read_stream


No comments:

Post a Comment