You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 (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. Therefore, the only guaranteed unique identifier for a given End-User is the combination of the iss Claim and the sub Claim.
Accounts 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).
The simplest solution seems to be a table of account links with a unique index of:
CREATETABLEuser_auth (
user_id UUID NOT NULLREFERENCES users (id),
login_type login_type NOT NULL,
linked_id textNOT NULL,
UNIQUE(user_id, login_type)
);
I don't see a reason to remove a link right now, but the implementor may discover one.
The text was updated successfully, but these errors were encountered:
@kylecarbs do we want to allow multiple forms of authentication for a user? It doesn't seem like other services allow that. For example with Gitlab I registered an account with an email and then tried to sign in with Google OAuth and it threw an error. Thinking we should probably do the same.
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.
See: https://openid.net/specs/openid-connect-core-1_0.html#ClaimStability
Accounts 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).
The simplest solution seems to be a table of account links with a unique index of:
I don't see a reason to remove a link right now, but the implementor may discover one.
The text was updated successfully, but these errors were encountered: