Title: Link OIDC accounts by unique identifier · Issue #3322 · coder/coder · GitHub
Open Graph Title: Link OIDC accounts by unique identifier · Issue #3322 · coder/coder
X Title: Link OIDC accounts by unique identifier · Issue #3322 · coder/coder
Description: Introduced by #3314. OIDC accounts are currently linked by a verified email address from the provider. If a user's upstream email address changes, this would cause a new user to be created in Coder instead of associating it. The sub (sub...
Open Graph Description: Introduced by #3314. OIDC accounts are currently linked by a verified email address from the provider. If a user's upstream email address changes, this would cause a new user to be created in Coder...
X Description: Introduced by #3314. OIDC accounts are currently linked by a verified email address from the provider. If a user's upstream email address changes, this would cause a new user to be created in C...
Opengraph URL: https://github.com/coder/coder/issues/3322
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Link OIDC accounts by unique identifier","articleBody":"Introduced by https://github.com/coder/coder/pull/3314. OIDC accounts are currently linked by a verified email address from the provider. If a user's upstream email address changes, this would cause a new user to be created in Coder instead of associating it.\r\n\r\n> The sub (subject) and iss (issuer) Claims, used together, are the only Claims that an RP can rely upon as a stable identifier for the End-User, since the sub Claim MUST be locally unique and never reassigned within the Issuer for a particular End-User, as described in [Section 2](https://openid.net/specs/openid-connect-core-1_0.html#IDToken). Therefore, the only guaranteed unique identifier for a given End-User is the combination of the iss Claim and the sub Claim.\r\n\r\nSee: https://openid.net/specs/openid-connect-core-1_0.html#ClaimStability\r\n\r\nAccounts should be linked by a unique identifier to the OIDC provider, not the email address. This can also take effect for OAuth2 authentication since each method (currently just GitHub) queries the upstream service API to get information (which would include a unique user ID).\r\n\r\nThe simplest solution seems to be a table of account links with a unique index of:\r\n\r\n```sql\r\nCREATE TABLE user_auth (\r\n user_id UUID NOT NULL REFERENCES users (id),\r\n login_type login_type NOT NULL,\r\n linked_id text NOT NULL,\r\n UNIQUE(user_id, login_type)\r\n);\r\n```\r\n\r\nI don't see a reason to remove a link right now, but the implementor may discover one.","author":{"url":"https://github.com/kylecarbs","@type":"Person","name":"kylecarbs"},"datePublished":"2022-07-31T19:23:12Z","url":"https://github.com/coder/coder/issues/3322"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:20ff648f-52a6-532a-9cd1-7982cc3df38e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B070:1AE20C:2892BF8:3356814:6B0197B5 |
| html-safe-nonce | 282b452798849142a5b909b57a7c2f87145b0a9a3d958efa377c6e16c0085d08 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDcwOjFBRTIwQzoyODkyQkY4OjMzNTY4MTQ6NkIwMTk3QjUiLCJ2aXNpdG9yX2lkIjoiMzk0MTQ0ODQ3MDk0MjAyOTc1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 57882116c345170de02350c6589833b1ec21c917e8643a0adc1e1c2c0c5f2fad |
| hovercard-subject-tag | issue:1323553127 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/3322/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5385581b8bfdbfa65d020a917c378ebc8a25c850305f52d0a538ac73d3a5f345/coder/coder/issues/3322 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5385581b8bfdbfa65d020a917c378ebc8a25c850305f52d0a538ac73d3a5f345/coder/coder/issues/3322 |
| og:image:alt | Introduced by #3314. OIDC accounts are currently linked by a verified email address from the provider. If a user's upstream email address changes, this would cause a new user to be created in Coder... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kylecarbs |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width