mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-24 19:19:08 +00:00
FEAT: init url callback
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user