update t p

This commit is contained in:
2025-09-17 22:27:01 -03:00
parent a7a7cc6cc1
commit 0e6a503ee4
8 changed files with 51 additions and 17 deletions

View File

@@ -30,6 +30,12 @@ export async function loader({ request, context }: Route.LoaderArgs) {
redirect: 'manual'
})
console.log('Issuer response', {
json: await r.json(),
headers: r.headers,
status: r.status
})
if (r.status === httpStatus.FOUND) {
return new Response(await r.text(), {
status: r.status,
@@ -37,11 +43,15 @@ export async function loader({ request, context }: Route.LoaderArgs) {
})
}
console.log('Issuer response', {
json: await r.json(),
headers: r.headers,
status: r.status
})
// Deny authorization if user lacks scopes requested by client
if (r.status === httpStatus.FORBIDDEN) {
return new Response(null, {
status: httpStatus.FOUND,
headers: {
Location: new URL('/deny', url.origin).toString()
}
})
}
return new Response(null, {
status: httpStatus.FOUND,