nuxt-auth
nuxt-auth copied to clipboard
feat: Add support for custom refresh handling
๐ Linked issue
Issue #714
โ Type of change
- [ ] ๐ Documentation (updates to the documentation, readme or JSdoc annotations)
- [ ] ๐ Bug fix (a non-breaking change that fixes an issue)
- [x] ๐ Enhancement (improving an existing functionality like performance)
- [x] โจ New feature (a non-breaking change that adds functionality)
- [ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
- [ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
The current behaviour for refreshing the users tokens does not provide many options for me as developer. As a developer I would like to be able to extend or customize this behaviour.
This PR:
- adds new types
RefreshHandler
andRefreshHandlerConfig
- adds the possibility to configure a custom
RefreshHandler
viarefreshHandler?
property toauth.session
- extracts the default refreshing behaviour to a separate file
๐ Checklist
- [x] I have linked an issue or discussion.
- [ ] I have added tests (if possible).
- [ ] I have updated the documentation accordingly.