Skip to content
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

Vue: add OAuth2 keycloak authentication #1133

Open
4 of 6 tasks
Franceq34 opened this issue Mar 23, 2022 · 8 comments · May be fixed by #10928
Open
4 of 6 tasks

Vue: add OAuth2 keycloak authentication #1133

Franceq34 opened this issue Mar 23, 2022 · 8 comments · May be fixed by #10928
Assignees
Labels
area: feature request 💡 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ client: vue $300 https://www.jhipster.tech/bug-bounties/

Comments

@Franceq34
Copy link
Contributor

Franceq34 commented Mar 23, 2022

Prerequisites

TO-DO

  • Create a sample project that adds the OAuth2 Keycloak module to the Vue frontend client and shows it working with login and logout
  • Create the vue-keycloak-module in the JHLite project which depends on vue-core-module
    • Use keycloak-js dependency from COMMON package at AngularOAuth2ModulesFactory and remove it from ANGULAR package
    • Add the vue auth module files to be ignored by code coverage tests because it doesn’t have tests. (waiting to the result of the discussion: Code coverage 100% for front end generated apps)
@pascalgrimaud pascalgrimaud changed the title Vue: add Oauth2 keycloak authentication Vue: add OAuth2 keycloak authentication Mar 28, 2022
@Bolo89 Bolo89 assigned Bolo89 and unassigned Bolo89 Apr 28, 2022
@pascalgrimaud
Copy link
Member

@Franceq34 : as you didn't start it yet, maybe @Bolo89 can take this ?

@pascalgrimaud pascalgrimaud added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/ labels Jul 23, 2022
@pascalgrimaud
Copy link
Member

Adding a bounty to motivate someone
Did you start this one @Bolo89 ?

@Bolo89
Copy link
Contributor

Bolo89 commented Jul 23, 2022

@pascalgrimaud the ticket is not started so someone else can take it

@pascalgrimaud pascalgrimaud added $300 https://www.jhipster.tech/bug-bounties/ and removed $100 https://www.jhipster.tech/bug-bounties/ labels Oct 15, 2022
@pascalgrimaud
Copy link
Member

Increasing the bounty to motivate people as it's a good feature to have

@DamnClin
Copy link
Collaborator

Warning : the goal is to build something modular and not doing lots of replacement to have something we can trust in time

@pascalgrimaud
Copy link
Member

Totally agree, and maybe we should not do the same code than in generator-jhipster and produce a dedicated for jhlite

@DamnClin
Copy link
Collaborator

Totally. I think I have working integration but I need to think of a modular mechanism AND this is far from being my personal priority for JHLite :⁠-⁠). Cc @Gnuk

@renanfranca renanfranca self-assigned this Aug 3, 2024
@renanfranca renanfranca removed their assignment Aug 15, 2024
@renanfranca renanfranca self-assigned this Sep 6, 2024
@renanfranca
Copy link
Contributor

renanfranca commented Sep 18, 2024

Hello,

I successfully completed the implementation of a sample project demonstrating the use of Keycloak with Vue, integrating it into a new frontend module following the recently defined pattern lead by @DamnClin . Here's the link to the pull request: renanfranca/jhlite-keycloak-sample-deed8534-9039-4c04-a6c6-3912e34dcc45#1

Below is a demo video proving the functionality and highlighting that the Keycloak-related features have been thoroughly tested:

vue-keycloak-sample-demo.mp4

image

Regarding the files from this sample that should be added to the vue-keycloak-module, in my opinion, the following should be included (without the respective test files, as it is part of the implementation details):

Regarding the component (src/main/webapp/app/auth/infrastructure/primary/AuthVue.vue) that demonstrates the login functionality and the logout with Keycloak, as well as the AxiosAuthInterceptor (src/main/webapp/app/shared/http/infrastructure/secondary/AxiosAuthInterceptor.ts), I would like to create documentation and include the contents of these files (with the respective tests) in that documentation. The reason is that this was my first time working with Keycloak, and I believe it’s important to showcase the practical usage of the module.

Edit: Here is the documentation showcasing the vue authentication module usage: vue-auth-components.md

If you have anything to add or would like to share your thoughts, please let me know :)

cc: @DamnClin , @pascalgrimaud , @murdos , @qmonmert and @Gnuk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: feature request 💡 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ client: vue $300 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants
@renanfranca @pascalgrimaud @Franceq34 @Bolo89 @DamnClin and others