[ ] All new/changed/fixed functionality is covered by tests (or N/A)
[X] I have added documentation for all new/changed functionality (or N/A)
📋 Changes
This PR adds the ability to specify audience and scopes to onLoad(). This fixes an issue in a specific scenario when using both useRefreshTokens and cacheLocation: CacheLocation.localStorage and logging in with audience causes the refresh token to be missing during initialization.
This happens because audience (and scopes) are used as part of the cache key when looking up the refresh token internally but until now a developer had no way to specify those values.
📎 References
Fixes #271
🎯 Testing
Tested manually by supplying audience and scope to onLoad(), logging in, and observing data coming through local storage and to /authorize.
📋 Changes
This PR adds the ability to specify
audience
andscopes
toonLoad()
. This fixes an issue in a specific scenario when using bothuseRefreshTokens
andcacheLocation: CacheLocation.localStorage
and logging in withaudience
causes the refresh token to be missing during initialization.This happens because
audience
(andscopes
) are used as part of the cache key when looking up the refresh token internally but until now a developer had no way to specify those values.📎 References
Fixes #271
🎯 Testing
Tested manually by supplying
audience
andscope
toonLoad()
, logging in, and observing data coming through local storage and to/authorize
.