Checklist
Describe the problem you'd like to have solved
Currently, getting an access token using the AuthService through either getAccessTokenSilently or getAccessTokenUsingPopup automatically sets the new access token in the AuthState. For most use cases this works fine, but this prevents using the AuthService to get an access token for a secondary account that could be used for account linking.
Describe the ideal solution
An optional parameter on the access token functions to prevent storing the access token would allow for using these functions to retrieve a token for a secondary account, which could then be used to link accounts through the Management API. This would have no impact on existing applications since the behavior would default to storing the token if the parameter is not set.
Alternatives and current workarounds
The AuthState storage is unique to this SDK, so the underlying auth0-spa-js library could be used to implement this behavior alongside the auth0-angular library. However, this would then require managing two libraries and keeping both up to date.
Additional context
No response
Checklist
Describe the problem you'd like to have solved
Currently, getting an access token using the AuthService through either
getAccessTokenSilentlyorgetAccessTokenUsingPopupautomatically sets the new access token in the AuthState. For most use cases this works fine, but this prevents using the AuthService to get an access token for a secondary account that could be used for account linking.Describe the ideal solution
An optional parameter on the access token functions to prevent storing the access token would allow for using these functions to retrieve a token for a secondary account, which could then be used to link accounts through the Management API. This would have no impact on existing applications since the behavior would default to storing the token if the parameter is not set.
Alternatives and current workarounds
The AuthState storage is unique to this SDK, so the underlying auth0-spa-js library could be used to implement this behavior alongside the auth0-angular library. However, this would then require managing two libraries and keeping both up to date.
Additional context
No response