chore: modified error code for magic-link provider check

This commit is contained in:
Balu Babu
2023-08-03 17:14:57 +05:30
parent 1704cc2bad
commit b9f36d04a8

View File

@@ -30,6 +30,7 @@ import { GithubSSOGuard } from './guards/github-sso.guard';
import { MicrosoftSSOGuard } from './guards/microsoft-sso-.guard';
import { ThrottlerBehindProxyGuard } from 'src/guards/throttler-behind-proxy.guard';
import { SkipThrottle } from '@nestjs/throttler';
import { AUTH_PROVIDER_NOT_SPECIFIED } from 'src/errors';
@UseGuards(ThrottlerBehindProxyGuard)
@Controller({ path: 'auth', version: '1' })
@@ -45,7 +46,7 @@ export class AuthController {
@Query('origin') origin: string,
) {
if (!authProviderCheck(AuthProvider.EMAIL))
throw new InternalServerErrorException();
throwHTTPErr({ message: AUTH_PROVIDER_NOT_SPECIFIED, statusCode: 404 });
const deviceIdToken = await this.authService.signInMagicLink(
authData.email,