mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:41:09 +02:00
debug(auth): add OIDC request logging
Add console.log statements to debug OIDC routing issues. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
e2a3277fa1
commit
ef7f906215
2 changed files with 4 additions and 0 deletions
|
|
@ -82,8 +82,10 @@ export class OidcController {
|
|||
* Handle OIDC request by forwarding to Better Auth
|
||||
*/
|
||||
private async handleOidcRequest(req: Request, res: Response) {
|
||||
console.log('[OIDC Controller] Handling request:', req.method, req.originalUrl);
|
||||
try {
|
||||
const response = await this.betterAuthService.handleOidcRequest(req);
|
||||
console.log('[OIDC Controller] Better Auth response status:', response.status);
|
||||
|
||||
// Set status code
|
||||
res.status(response.status || HttpStatus.OK);
|
||||
|
|
|
|||
|
|
@ -1203,6 +1203,7 @@ export class BetterAuthService {
|
|||
headers: Record<string, string>;
|
||||
body: unknown;
|
||||
}> {
|
||||
console.log('[handleOidcRequest] Received request:', req.method, req.originalUrl);
|
||||
try {
|
||||
// Convert Express request to Fetch Request
|
||||
const url = new URL(
|
||||
|
|
@ -1210,6 +1211,7 @@ export class BetterAuthService {
|
|||
this.configService.get<string>('BASE_URL') ||
|
||||
`http://localhost:${this.configService.get<number>('PORT') || 3001}`
|
||||
);
|
||||
console.log('[handleOidcRequest] Constructed URL:', url.toString());
|
||||
|
||||
const headers = new Headers();
|
||||
for (const [key, value] of Object.entries(req.headers)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue