Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

valid access token passes introspection but fails at userinfo #210

Open
melanger opened this issue Apr 5, 2023 · 0 comments
Open

valid access token passes introspection but fails at userinfo #210

melanger opened this issue Apr 5, 2023 · 0 comments

Comments

@melanger
Copy link
Contributor

melanger commented Apr 5, 2023

I have an access token which is valid (according to database and introspection) but userinfo rejects it at the same time.

The error message is coming from here:

if not _auth_event["valid_until"] >= utc_time_sans_frac():
logger.debug(
"authentication not valid: {} > {}".format(
datetime.fromtimestamp(_auth_event["valid_until"]),
datetime.fromtimestamp(utc_time_sans_frac()),
)
)
allowed = False

It might be a misalignment of different time formats or time zones.

  • in the database, there is expires_at: ISODate("2023-04-05T23:54:22.000Z")
  • I ran the userinfo request on 2023-04-05 at 23:32 CEST (+2)
  • th error message said authentication not valid: 2023-04-05 12:54:22 > 2023-04-05 21:32:46 where
    • 2023-04-05 12:54:22 is probably wrong, it should be the same as expires_at
    • 2023-04-05 21:32:46 is the current time but GMT (+0) instead of CEST (+2)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant