FEAT: init url callback

This commit is contained in:
marcos-silva-rodrigues
2025-06-25 10:28:26 -03:00
parent a5c8de496d
commit 57e6e49c7c
4 changed files with 72 additions and 16 deletions
+18
View File
@@ -420,4 +420,22 @@ export class AuthController {
return this.authClient.resetUsers(body.users, metadata);
}
@Get('/idp/:name/callback')
@HttpCode(HttpStatus.OK)
async callbackIdp(@Param('name') idpName: string, @Req() req: Request) {
this.logger.info('/auth/idp/:name/callback');
const { params } = req;
if (!params || !params.code) {
this.logger.error('No code received from IDP');
throw new Error(ErrorCodes.IDENTITY_PROVIDER.INVALID_RESPONSE);
}
return {
ok: true
}
}
}