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

Redirect to login page when user session/token expires #801

Closed
gquintana opened this issue Aug 30, 2021 · 4 comments · Fixed by #1539
Closed

Redirect to login page when user session/token expires #801

gquintana opened this issue Aug 30, 2021 · 4 comments · Fixed by #1539
Labels
enhancement New feature or request good first issue Good for newcomers login Login & Acls on AKHQ ui Need an ui update

Comments

@gquintana
Copy link
Contributor

  1. I have an AKHQ with security enabled plugged to an LDAP directory.
  2. I successfully log into AKHQ using AKHQ login page
  3. I sucessfully use AKHQ ui for a while
  4. Something expires: in AKHQ 0.17 I got "500 Internal Server Error" notifications, on AKHQ 0.18 nothing happens anymore but all the screens remain empty. Anonymous connection has no rights at all in my case, so I guess API calls return nothing or timeout.
  5. I have to click on the Logout button to show the login page

I'd like the login page to appear automatically when the user token expires, or at least be properly notified that expiration occured and force logout.

@tchiotludo tchiotludo added login Login & Acls on AKHQ ui Need an ui update labels Sep 13, 2021
@tchiotludo tchiotludo added the enhancement New feature or request label Sep 13, 2021
@tchiotludo
Copy link
Owner

The better will be to used true JWT token on the UI side I think (not the cookie one) but as I remember we can't because of OIDC connect (the redirect is on backend as I remember).
So we need to add the expiration time /me and maybe add refresh or at least a simple redirect.

@tchiotludo tchiotludo added the good first issue Good for newcomers label Feb 24, 2022
@jheinitz
Copy link
Contributor

jheinitz commented Jul 1, 2022

Good morning,

is there any news on this one? As some kind of workaround might it be possible to increase the timeout?

Thanks ad best regards

Jens

@tchiotludo
Copy link
Owner

You can raise the timeout of the using this configuration :

    micronaut:
      security:
        token:
          jwt:
            generator:
              access-token-expiration: 36000
              access-token:
                expiration: 36000
            cookie:
              cookie-max-age: 10h

@jheinitz
Copy link
Contributor

jheinitz commented Jul 1, 2022

Hi!

Thanks for the hint. That works fine. I played around a bit and figured out that the access-token-expiration can be omitted. The other access-token: and expiration: is sufficient.

BR Jens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers login Login & Acls on AKHQ ui Need an ui update
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants