We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5b2a5b commit 4fcbb68Copy full SHA for 4fcbb68
src/client/auth.ts
@@ -110,6 +110,9 @@ export async function auth(
110
if (resourceMetadata.authorization_servers && resourceMetadata.authorization_servers.length > 0) {
111
authorizationServerUrl = resourceMetadata.authorization_servers[0];
112
}
113
+ if (resourceMetadata.resource && resourceMetadata.resource !== resource.href) {
114
+ throw new Error(`Protected resource ${resourceMetadata.resource} does not match expected ${resource}`);
115
+ }
116
} catch (error) {
117
console.warn("Could not load OAuth Protected Resource metadata, falling back to /.well-known/oauth-authorization-server", error)
118
0 commit comments