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

OAuth2: fix logout #18197

Merged
merged 1 commit into from
Mar 24, 2022
Merged

Conversation

pascalgrimaud
Copy link
Member

OAuth2+Logout is broken since v7.5.0
It was removed here https://github.com/jhipster/generator-jhipster/pull/17162/files


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@DanielFran DanielFran merged commit b2949af into jhipster:main Mar 24, 2022
@mshima
Copy link
Member

mshima commented Mar 24, 2022

The logout function is bugged and misleading.
The login method does the redirection:

loc.href = `//${loc.hostname}${port}${contextPath}oauth2/authorization/oidc`;

The logout function should be called getLogoutUrl or do the logout itself.

public logout() : AxiosPromise<any> {
return axios.post('api/logout');
}

@pascalgrimaud
Copy link
Member Author

@mshima : do you mean this fix is not correct?

Currently:

  • click on sign out in the app
  • click on sign in, no need to enter the password, because you are already authenticated in Keycloak

@pascalgrimaud pascalgrimaud added this to the 7.8.0 milestone Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants