Skip to content

Commit

Permalink
Update authorization-url.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 authored Feb 5, 2025
1 parent 8a91491 commit fad914c
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/core/src/lib/actions/signin/authorization-url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,8 @@ export async function getAuthorizationUrl(
const as = await o
.processDiscoveryResponse(issuer, discoveryResponse)
.catch((error) => {
if (error instanceof TypeError && error.message === "Invalid URL") {
throw new TypeError(
"Authorization server metadata discovery returned an invalid issuer." +
"expected: " +
issuer
)
} else {
throw error
}
if (!(error instanceof TypeError) || error.message !== "Invalid URL") throw error
throw new TypeError(`Discovery request responded with an invalid issuer. expected: ${issuer}`)
})

if (!as.authorization_endpoint) {
Expand Down

0 comments on commit fad914c

Please sign in to comment.