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 617facc commit 5b63dd6Copy full SHA for 5b63dd6
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(`Resource returned by RFC9728 PRM (${resourceMetadata.resource}) doesn't match the expected resource ${resource.href}`);
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