workos-node icon indicating copy to clipboard operation
workos-node copied to clipboard

Refresh token already exchanged. invalid_grant

Open monolithed opened this issue 1 year ago • 4 comments

Periodically, with every call to workos.userManagement.authenticateWithRefreshToken, I encounter this error. It'd be great to understand where it's coming from and fix it.

Screenshot 2025-01-12 at 00 11 32



Active discussion is here: https://github.com/workos/authkit-nextjs/issues/28

How to reproduce: set a 2-minute access token expiration time, and after 5-10 refreshes, this error will occur.

monolithed avatar Jan 11 '25 17:01 monolithed

@monolithed Did you ever figure this out? I am also getting this issue.

watadarkstar avatar Feb 28 '25 19:02 watadarkstar

@watadarkstar The 2.0.1 release yesterday fixed this for me.

gblache avatar Feb 28 '25 19:02 gblache

@gblache Which package are you referring to when you say 2.0.1 release? You are a life saver!

watadarkstar avatar Feb 28 '25 21:02 watadarkstar

@watadarkstar Oops, I should have been more clear. I'm talking about the NextJS library: https://github.com/workos/authkit-nextjs. The issue in that library was causing this error to be surfaced but it wasn't the root cause, for me.

gblache avatar Feb 28 '25 21:02 gblache