Could not retrieve user profile information Invalid token

Created on 13 May 2015, about 9 years ago
Updated 20 October 2023, 9 months ago

We are trying to use a custom application based on googles Oauth2 to respond to multiple Oauth2 plugins in the same way that google responds. In this way there is one place to manage multiple Oauth2 applications.

OpenID connect is ideal as we can set custom end point before its passed on to google back through our custom application to authorise a user on the Drupal site. However, after verification on google we get the error

Could not retrieve user profile information (401 Unauthorized). Details: Array ( [error] => Invalid token )
which fails on the URL
/openid-connect/generic?code=b515f1fc-3ce1-4b73-8ca0-3793797e9a3f&response_type=code&state=28a0a7a134f182be32af4027cd357e01

The first leg of the process is completing and returns and access code to drupal the next step is for the module to post back, which it does to the right place but is not including the access token. It looks like OpenId puts the token into the header and Oauth2 has it in the URL. Do you have any suggestions for this?

http://openid.net/specs/openid-connect-core-1_0.html#UserInfoRequest

πŸ’¬ Support request
Status

Closed: works as designed

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom BigEd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024