-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
Login with OAuth via OpenID Connect (OIDC) #2860
Conversation
* New translations en-us.json (Italian) * New translations en-us.json (Norwegian) * New translations en-us.json (Portuguese)
🔥 🔥 🔥 Couple of questions from an idiot.
|
Mainly because I have more experience with OAuth and OIDC. From my understanding, Forward Auth Headers are great for adding authentication to an application that otherwise doesn't have authentication. I've also seen that popular providers like Authelia, Authentik and Keycloak offer both Forward Auth and OIDC, so if someone is using one of those providers, it's probably easier to set up auth via OIDC instead. Finally, because its pretty much "built-in" with nuxt-auth. Obviously I ended up having to create a custom provider because we serve the frontend as a SPA, most of the work is handled by that package, which is great. If Header Auth is something the community wants, I know there was some great work done in #2040, which I could certainly take a look at also getting over the finish line.
I think it is still worthwhile to support both methods. I can see someone wanting to just have an LDAP server without setting up an authentication provider. Especially if all their self-hosted apps all support LDAP (which many do), there would really be no need. I think as long as LDAP is used and doesn't become a chore to maintain, we should keep it.
I think it could be worth looking into. I would like to see if the OIDC implementation could be cleaned up a bit still. One thing I dislike is that now, our token verification is different between OIDC vs credential and LDAP. I should have some time next week to look into potential solutions
Maybe. I got a new job about halfway through the year, so I've been much more busy than I was earlier in the year when I was fixing LDAP issues. Let me think on it some more |
Hey @hay-kot, sorry for the delay, I was on vacation. I'll get this branch up to date. I've been using this branch for a few weeks and did find a bug with the JWT not expiring leading to basically never expiring sessions. I should probably fix this bug before merging |
Alright, I think I've squashed the bug now. This is ready for a review again |
What type of PR is this?
What this PR does / why we need it:
This PR adds the popularly requested login via OpenID Connect (OIDC), specifically using the Authorization Code Flow with PCKE. The work in this PR was originally based off of #1891, but has been modified to work with the switch over to the frontend being a SPA.
This PR comes complete with end-to-end tests for testing the login flow using OIDC. These tests make use of a mock oidc server docker container and Playwright to run the UI tests.
Special notes for your reviewer:
Since we are close to a v1 release, this could maybe wait until after the release so as not to push it back. While I don't think there are any breaking changes with this, various configurations should be tested by users to make sure it covers as many use cases as possible.
Testing
New E2E tests and manual