mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
fix(auth): expose JWKS at /api/auth/jwks for OIDC discovery
Better Auth's discovery document points to /api/auth/jwks, so we need to expose this route directly in NestJS. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
2021cf9e22
commit
e46a4c96df
1 changed files with 12 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ export class OidcController {
|
|||
}
|
||||
|
||||
/**
|
||||
* JWKS Endpoint
|
||||
* JWKS Endpoint (via /api/oidc/jwks)
|
||||
*
|
||||
* Returns JSON Web Key Set for token verification.
|
||||
*/
|
||||
|
|
@ -70,6 +70,17 @@ export class OidcController {
|
|||
return this.handleOidcRequest(req, res);
|
||||
}
|
||||
|
||||
/**
|
||||
* JWKS Endpoint (via /api/auth/jwks)
|
||||
*
|
||||
* Better Auth's discovery document points to this path,
|
||||
* so we need to expose it directly as well.
|
||||
*/
|
||||
@Get('api/auth/jwks')
|
||||
async jwksAlt(@Req() req: Request, @Res() res: Response) {
|
||||
return this.handleOidcRequest(req, res);
|
||||
}
|
||||
|
||||
/**
|
||||
* Catch-all for other OIDC endpoints
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue