-
Notifications
You must be signed in to change notification settings - Fork 96
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
Added use Management API for user data #368
Conversation
015bd8f
to
fd5d0f0
Compare
6f39965
to
d552116
Compare
…ment token; updated WP_Auth0_Api_Client::resend_verification_email() to use this token function; replaced WP_Auth0_Api_Client::get_user_info() with WP_Auth0_Api_Client::get_user() to return user information during login (management API access is acquired as part of this upgrade), which fixes identities being returned; added read:users as a required scope; updated DB upgrade to use new WP_Auth0_Api_Client::get_client_token() function to confirm that a client_credentials token can be returned.
d552116
to
c68dd4e
Compare
@cocojoe @glena - After our conversation about the Implicit flow use case, I'm wondering if this (and probably a few other things) needs to get re-worked. Implicit users, if they really are blocked from calling the Auth0 server, won't benefit from a client grant, won't be able to use the resend email verification anyways, and won't have the user information that makes it possible to change password, email, etc. Maybe all of that is expected (maybe not?) in which case we probably need to check for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question. Also I presume you only need openid
scope now as you getting email from somewhere else? Shouldn't implicit still require it so it can get from the id_token?
public static function get_client_token() { | ||
|
||
$response = wp_remote_post( self::get_endpoint( 'oauth/token' ), array( | ||
'headers' => self::get_headers( '', 'application/x-www-form-urlencoded' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is content-type
specified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cocojoe - self::get_headers()
@cocojoe - RE: implicit scope ... it does, look a couple of lines down, you'll see implicit adds additional scopes. |
Fixes #348 |
This PR changes where user information comes from on login. Switching from the Auth API /userinfo to the Management API /users/user_id to get identities.