Skip to content

feature: support OAuth token revocation #15575

@johnstcn

Description

@johnstcn

Problem

Coder currently does not revoke users' oauth tokens when they unlink an account.
This is explicitly called out here:

info="This does not revoke the access token from the oauth2 provider.

RFC 7009 specifies a mechanism whereby OAuth authorization servers may expose an endpoint allowing immediate revocation of an access token or refresh token.

This is supported by the following external authentication providers:

Unfortunately, this does not appear to be uniformly supported across providers.
It is currently not supported / unknown on these providers:

Some providers provide custom implementations not in line with the spec:

Proposed Solution

When a user unlinks their account, coderd should attempt to revoke the token via the /revoke endpoint if configured.
The token revocation endpoint should be specified by CODER_EXTERNAL_AUTH_#_REVOKE_URL.
This will be done on a 'best effort' basis. If the authorization server returns any response other than 200, we should assume that the token revocation failed and advise the user to delete the token manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueEasily solved issues suitable for starters and community contributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy