-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add OpenID Connect authentication #1164
Conversation
The server has a backwards incompatible change of no longer returning a valid token during bootstrap. This is an intentional choice to force the user to log in after configuring the server, in order to make sure the configuration is valid.
✅ Deploy Preview for actualbudget ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! I have a few comments here and a few more on the server PR but overall this approach seems solid and we’d like to have OIDC support built in. (I am also excited to use the new flexibility on the server to support passkeys)
packages/desktop-client/src/components/manager/subscribe/Bootstrap.tsx
Outdated
Show resolved
Hide resolved
If you don't have an openid server then https://oauth.tools/ is a good resource for testing. |
👋 This PR seems to have gone stale with many conflicts. If you resume working on it - please open a new PR and we'll happily work with you to get this merged ASAP. |
This seems as a welcoming change for actual. Quick question, How can a user with existing budget files move to a new instance with this openid configuration. Also @apilat I would love to contribute to this as well. |
I'd love to see this implemented, this is currently the one missing feature that keeps me from hosting Actual. Is there any way a non-developer like me could help? |
Would also LOVE to see this implemented!! |
Partially addresses #61 and #515 by adding support for OpenID Connect and generally a more flexible approach to authenticating with the server. Sister PR for server available as actualbudget/actual-server#219
The flow of the bootstrap/login process is
/bootstrap
request which now accepts an additional parameteropenid: {issuer, client_id, client_secret, server_hostname}
.GET /login-methods
to receive a list of supported login methods (currently password or openid)POST /login-openid
withreturn_url
parameter (pointing back to the frontend), server returnsredirect_url
leading to the openid issuer, client redirects/login-openid/cb
on server/login/openid-cb
on client, passing the tokenSome of the changes in the code and not backwards compatible (most importantly server SQL schema and /account/bootstrap behavior). I'm not sure what the project's approach to such changes is - it might be possible to add in special cases to allow a client to connect to an older server. However, this might not be necessary if users are expected to self-host instances and upgrade the server and client in tandem.
A more pressing issue is database schema migration - I couldn't find any precedent for how this is done in the server so I would appreciate the maintainer's view on the best approach to do this.
For a user that doesn't use OpenID, this PR slightly changes the bootstrap behavior for passwords as well. Namely, after setting up the password in /bootstrap, the user isn't instantly granted access but instead redirected to /login. This is quite an important change for OpenID as otherwise the user has no way of knowing whether the OpenID configuration works at all. In the case of password authentication, misconfiguration is less likely but nevertheless double-checking the user remembers the password doesn't seem too inconvenient to me.
I am not very familiar with React, so let me know if I have broken any coding conventions. Likewise with web design, I welcome improvements to the presentation of the login/bootstrap screens.