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

Token used before issued #439

Open
SaiTejaSuvvari opened this issue Jul 27, 2023 · 2 comments
Open

Token used before issued #439

SaiTejaSuvvari opened this issue Jul 27, 2023 · 2 comments

Comments

@SaiTejaSuvvari
Copy link

Describe the bug
DecodeAccessToken returns error 'token used before issued'

To Reproduce
Steps to reproduce the behavior: (keycloak setup using podman compose)

  1. Call LoginAdmin using admin credentials
  2. Call DecodeAccessToken from access token string obtained in the above step
  3. Got error

Expected behavior
Token is issued and returned by keycloak. Decode Access Token parses it to the custom data types. Not sure why this error is produced.

Keycloak setup in podman compose
keycloak:
image: quay.io/keycloak/keycloak:22.0.0
ports:
- "5400:8080"
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
networks:
- gamma_network
volumes:
- ./data:/opt/jboss/keycloak/standalone/data
command: start-dev

@ctradu
Copy link

ctradu commented Dec 5, 2023

The issue seems to appear when there is a time skew between the keycloak server and the client that issued the token.
It should be fixed by 08a69ff

See also: https://github.com/golang-jwt/jwt/blob/main/MIGRATION_GUIDE.md for v5.0.0
And: golang-jwt/jwt#98

@AndreFK
Copy link

AndreFK commented Jan 24, 2024

Im running into this same error, and I'm using the following version

github.com/Nerzal/gocloak/v13 v13.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants