Domanda

Am trying to use OAuth 2.0 to avoid adding YAP (yet another password) to the world. The PHP implementation of google OAuth seems to work quite well with the (albeit small) issue of setting the type of access being requested.

App is setup to use the 'identity toolkit API' only. In the sign in I'm not calling the setAccessType but the 'offline mode' seems to be the default permission requested. Truthfully, I want the user id and not much else.

While I was experimenting with the PHP samples quite often it would tell me it needed email address and some other personal bits but I haven't been able to figure out how to set this.

It's a small matter but seems like a reasonable thing to notify users about.

Suggestions?

È stato utile?

Soluzione

Looks like you are looking for the scope parameter. For Google logins scopes are documented here. Likely profile is the one you are looking for.

I don't know which library you are using, but all it takes is a scope query string param on the authorization request.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top