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
feat: Support Auth0 as OIDC provider #15634
Conversation
I'm on vacation until August 2. I'll be happy to review when I return. If you want to merge sooner, I'd suggest adding the Auth0 steps to www.jhipster.tech/security |
Sure. I will wait for your review. Meantime, I will also add setup and configuration instructions on the website. |
generators/server/templates/src/main/java/package/web/rest/LogoutResource.java.ejs
Outdated
Show resolved
Hide resolved
@@ -86,6 +86,9 @@ export class LoginService { | |||
// if Keycloak, uri has protocol/openid-connect/token | |||
if (logoutUrl.includes('/protocol')) { | |||
logoutUrl = logoutUrl + '?redirect_uri=' + redirectUri; | |||
} else if(logoutUrl.includes('auth0.com')) { |
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 logic isn't great because Auth0 users can have custom domains.
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.
I agree. At the moment, I don't have a better way to identify. Also, I am not very happy with the if-else blocks spreading across frontend, e2e, and backend layers to distinguish between different providers. I will create an improvement issue to handle that in a better way.
generators/client/templates/angular/src/main/webapp/app/login/login.service.ts.ejs
Outdated
Show resolved
Hide resolved
generators/client/templates/react/src/main/webapp/app/modules/login/logout.tsx.ejs
Outdated
Show resolved
Hide resolved
...rators/server/templates/src/main/java/package/config/SecurityConfiguration_reactive.java.ejs
Outdated
Show resolved
Hide resolved
generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs
Outdated
Show resolved
Hide resolved
generators/server/templates/src/main/java/package/security/oauth2/CustomClaimConverter.java.ejs
Outdated
Show resolved
Hide resolved
generators/server/templates/src/main/java/package/web/rest/LogoutResource.java.ejs
Outdated
Show resolved
Hide resolved
generators/server/templates/src/main/java/package/web/rest/LogoutResource.java.ejs
Outdated
Show resolved
Hide resolved
generators/client/templates/vue/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs
Outdated
Show resolved
Hide resolved
Co-authored-by: Matt Raible <matt.raible@okta.com>
|
||
### Auth0 | ||
|
||
If you'd like to use [Auth0](https://auth0.com/) instead of Keycloak, you can follow the below configuration steps: |
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.
I will also prefer to remove the below documentation and instead point to the one documented on https://www.jhipster.tech/security/#oauth2 section
@vishal423 : approved. Great work |
Closes #14864
Please make sure the below checklist is followed for Pull Requests.
When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding
skip-ci
label, you can still see CI build result at your branch.