Option to not use redirect_uri for grant_type 'refresh_token'

Created on 20 December 2022, almost 2 years ago
Updated 3 February 2023, almost 2 years ago

Problem/Motivation

I'm using a service that causes an error when when authenticating with the redirect_uri param when the grant_type is 'refresh_token'. So the initial authentication works but it breaks when the access token is expired. When I unset the redirect_uri param before requesting the new token, everything is fine.

Proposed resolution

I'm new to this module so maybe I'm missing something, if so, please close this issue. If not, it would be nice if we could somehow have an option to omit the redirect_uri param in the flow when request a new token with a refresh_token.

✨ Feature request
Status

Closed: works as designed

Version

4.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium rgeerolf Belgium πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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.

  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    I'll look into this - first we need to check the Oaut2 standard

  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York
  • Status changed to Closed: works as designed almost 2 years ago
  • πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

    Although the redirect_uri is not required, it is typical.

    From a code perspective, you can override \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginBase::getRedirectUri and if necessary \Drupal\oauth2_client\Plugin\Oauth2Client\Oauth2ClientPluginBase::getProvider in your implementing plugin. You will have to consider how you are handling storing the initial returned token if you are using the authorization code grant.

Production build 0.71.5 2024