-
Notifications
You must be signed in to change notification settings - Fork 889
Allow conversion of email/password authenticated account to OpenID Connect authed account #4505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I suppose the biggest difference between us and SaaS apps is the emails in Coder aren't verified when using email/password. There exists a scenario (however unlikely) in the fix you're requesting where an admin creates an account with the wrong email e.g. At the time it was simpler to prevent people using multiple login types but I understand why this is frustrating. I think maybe the solution is to add email verification and allow users with verified emails to login using different forms of SSO. @bartonip thoughts? |
@sreya that's a great point you raise regarding old emails and incorrectly entered emails. That has happened to us once or twice with our SSO with other SaaS apps that do that. With the old/new email conundrum, how I would expect SSO to work is that its not JUST the email is used to identify the user as OIDC can send other claims like a unique ID for example. With the account inheritance issue, I have seen this issue solved where when a user logs using OIDC and a standard auth account exists, they are required to log into said account to provide consent to "merge" the accounts. In my mind, when I look at how SSO works with say, AWS, Office 365, Google Workspace, Sentry, Slack etc. they put the onus on the admin to ensure that the accounts are being linked correctly and I think that most sysadmins would expect this anyway. In my opinion the best solution would be:
I think the above solves my issue with having some devs on standard auth and the rest using OIDC. Let me know what you think @sreya |
I like the steps to merge the accounts @bartonip... if the user provides the password anyways, seems like they could be merged. |
@kylecarbs it would be great if this could be added in as we have a couple of users stuck on email/password auth where our new users are all on OIDC which causes a small security issue for us in that we have to specifically remember to deactivate these users accounts when they leave |
I'm also interesting in migrating/merging users currently authenticating with passwords to SSO. Let me know if there's something I can do to help, but I might need a few pointers in the codebase. |
@kylecarbs would you be able to break down the general steps of how to implement this? I am happy to work on this between food comas over the Christmas/New Year break. @NiklasRosenstein happy if you would like to join? |
I think instead of implementing a "merge accounts" feature during login, we could continue to block login for the user until they login with their password and click "link OIDC account" in the settings page or something. |
As a part of this, we should also show which account type the user is in the |
Ok, I got the functionality working for this, just need to polish it all up. I took @deansheather's idea. On the Account settings page there will be a form to "Link/Merge/Convert (idk wording) with OIDC/Github". There will also be a password field. How it works is:
This state string is paired to a user and OIDC type. So if they generate an OIDC one, they cannot convert to github and vice versa. The state has a 5min expiry. So if the conversion does not happen quickly, the string expires and the flow needs to be restarted. A pro of this design is that it does not change the OIDC flow much at all. It just adds in the conversion code to a previous error condition. |
We set up coder for a few users before we set the OpenID Connect functionality up, we now have some people logging on with email/passwords and others with SSO. It would be great if the account could automatically accept OpenID Connect sign in if the email is correct as is the case with most other SaaS apps that work with SSO.
The text was updated successfully, but these errors were encountered: