You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: persist resource metadata URL across OAuth redirects
In browser OAuth flows, when the user is redirected to the authorization
server and back, the resourceMetadataUrl discovered from the
WWW-Authenticate header was lost. This caused token exchange to fail
because the SDK couldn't locate the correct token endpoint.
This commit adds two optional methods to OAuthClientProvider:
- saveResourceMetadataUrl(url): Saves the URL before redirect
- resourceMetadataUrl(): Loads the saved URL after redirect
The SDK now:
1. Loads resourceMetadataUrl from provider if not passed in options
2. Saves resourceMetadataUrl before calling redirectToAuthorization()
This change is fully backwards-compatible as both methods are optional.
Providers that don't implement them will continue to work as before.
Fixes#1234
0 commit comments