OAuth Server, invalid Access Token
-
Hi,
TLDR:
I’m evaluating using WP Auth from NET Core. However, I’m getting a Bad Request when accessing the /oauth/me endpoint.
Details:
My client sends the authorize request like this:Then gets a code at the callback URL and uses it successfully to get an access token:
https://backupshop.wpengine.com/oauth/token
with
client_id=<redacted>&redirect_uri=https%3A%2F%2Flocalhost%3A5000%2Fcallback&client_secret=<redacted>&code=sm3lyidi1iipwx6af96xfiwhdz8i3y0zxvhx439m&grant_type=authorization_codeThe response contains the access token:
access_token=udgbhlgft7celbtvmulr718ewwpf3qeey3wtkczxnqayzixuyk0vd4ldfjv8Then, as is usual for libraries wrapping external OAuth2 providers for ASP NET Core, it tries to get the profile info:
https://backupshop.wpengine.com/oauth/me
with
Authorization: Bearer udgbhlgft7celbtvmulr718ewwpf3qeey3wtkczxnqayzixuyk0vd4ldfjv8However, the response is
Bad Request
with
{“error”:”invalid_request”,”error_description”:”Invalid token”,”error_uri”:”https:\/\/tools.ietf.org\/html\/draft-ietf-oauth-v2-31#section-7.2″}However, the token sent was the right one. So I am somewhat at a loss here.
Any ideas?
Thanks,
Mark
- The topic ‘OAuth Server, invalid Access Token’ is closed to new replies.