auth0 / auth0-flutter

Auth0 SDK for Flutter
https://pub.dev/documentation/auth0_flutter/latest/
Apache License 2.0
59 stars 39 forks source link

fix: allow audience and scope to be supplied during initialization #272

Closed stevehobbsdev closed 1 year ago

stevehobbsdev commented 1 year ago

📋 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.