Support use sso (like OIDC .etc) to login or signup Dokploy
What problem will this feature address?
Permissions management and user management issues
Describe the solution you'd like
Support for SSO login and registration for Dokploy
Describe alternatives you've considered
Additional context
No response
Will you send a PR to implement it?
No
This is actually not too difficult now that Dokploy has moved to better-auth - there's a dedicated plugin for it:
- https://www.better-auth.com/docs/plugins/sso
Also would love to see this feature. Integrating with OIDC will make this an easy sell for my team. I think that's the only hold up.
I would be happy to start working on a PR for this once I have some free time.
@BradHacker Have you started/finished working on this yet? I was working on this myself and then I found this issue so I want to confirm it before I start/keep working on a "duplicate" feature :)
P.S. I haven't got very far yet as I just started but I would still like to confirm if you already have it setup or not.
@BradHacker Have you started/finished working on this yet? I was working on this myself and then I found this issue so I want to confirm it before I start/keep working on a "duplicate" feature :)
P.S. I haven't got very far yet as I just started but I would still like to confirm if you already have it setup or not.
No I haven't. Glad to see movement on this.
Also interested in seeing this in Dokploy!
+1
Alright, small update for everyone. I've managed to have a working version of an OIDC provider that is stored in the database. I'm now just working on the UI for saving and enabling the providers.
Small note, I'm at a problem that I would probably need to restart the dokploy instance since i can't hot-reload the better-auth instance (at least I cannot find a way to do it).
Todo List
- [x] Setup hardcoded OIDC/oAuth provider for testing
- [x] Create a db schema for storing the providers
- [x] Get the providers from the db instead of hardcoded
- [x] Show buttons for each (enabled) provider that is stored in the db
- [ ] Create a settings page for managing the providers
- [ ] Update the providers in the better-auth config
- Probably need to restart the entire dokploy service for this, if you have suggestions on how to do this please suggest those.
- UPDATE: I just found out that i could have used the SSO plugin instead of the Generic OAuth plugin so... I guess I'll rework it seeing as this also has SAML support (I cannot test this since I do not own/have no idea on how to temporarily spin up a SAML provider) and can dynamically register a idp (
await auth.api.registerSSOProvider({...})).
- [ ] Clean up my messy and ugly code
- [ ] Check if i have followed each convention (probably not)
- [ ] Create pull request
For all watchers, someone else has just opened a PR that adds an OIDC provider to Dokploy in #2776