network icon indicating copy to clipboard operation
network copied to clipboard

fix: set access_type=offline if scope offline_access is requested in the google oidc provider

Open tsearle opened this issue 2 years ago • 2 comments

Preflight checklist

Describe the bug

google doesn't support the scope "offline_access" instead it uses the parameter access_type=offline

the oidc provider needs to detect if "offline_access" is requested, remove it from the scope list and add access_type=offline to the auth_url

Reproducing the bug

set the identity as follows

the auth_url and token_url values are ignored

oidc:
  config:
    providers:
    - client_id: xxxx
      client_secret: xxx
      id: google
      label: Google
      mapper_url: xxx
      provider: google
      scope:
      - email
      - profile
      - offline_access
      - https://www.googleapis.com/auth/gmail.compose
      - https://www.googleapis.com/auth/gmail.readonly
      
      
      

Relevant log output

No response

Relevant configuration

No response

Version

ory-network

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

tsearle avatar Feb 09 '23 13:02 tsearle

https://github.com/ory/kratos/pull/3088

instead of overriding the AUTH_URL I've made an attempt to adapt the google oicd provider to work the way google expects

tsearle avatar Feb 09 '23 15:02 tsearle

related issue https://github.com/ory/kratos/issues/3031

tsearle avatar Feb 09 '23 15:02 tsearle