next-auth icon indicating copy to clipboard operation
next-auth copied to clipboard

chore(docs): Fixes refresh token example

Open jakehewitt opened this issue 3 years ago โ€ข 1 comments

โ˜•๏ธ Reasoning

What changes are being made? What feature/bug is being fixed here?

  • On initial login account.expires_at is a timestamp and shouldn't be added to Date.now().
  • When refreshing the token refreshedTokens.expires_at is undefined. It should be using refreshedTokens.expires_in

๐Ÿงข Checklist

  • [X] Documentation
  • [ ] Tests
  • [X] Ready to be merged

๐ŸŽซ Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: No open issues

Related to: https://github.com/nextauthjs/next-auth/pull/4540

๐Ÿ“Œ Resources

jakehewitt avatar Jul 06 '22 03:07 jakehewitt

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Updated
next-auth โœ… Ready (Inspect) Visit Preview Jul 6, 2022 at 4:29PM (UTC)

vercel[bot] avatar Jul 06 '22 03:07 vercel[bot]

Any updates on this one? We are currently looking at using this library, which looks very solid and clean. We miss the refresh token rotation at the moment to have it fully integrated with the library.

vwatel avatar Dec 29 '22 13:12 vwatel

This documentation has been rewritten at: https://authjs.dev/guides/basics/refresh-token-rotation

The related issue about expires_in vs expires_at is tracked here #6538

balazsorban44 avatar Feb 10 '23 01:02 balazsorban44