chore(docs): Fixes refresh token example
โ๏ธ Reasoning
What changes are being made? What feature/bug is being fixed here?
- On initial login
account.expires_atis a timestamp and shouldn't be added to Date.now(). - When refreshing the token
refreshedTokens.expires_atis undefined. It should be usingrefreshedTokens.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
- Contributing guidelines
- Code of conduct
- Contributing to Open Source
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) |
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.
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