mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
* changes * changes * e2e testcases * fixes * fix * changes * e2e fixes * test cases * clean up * redirection changes * style changes * test cases * testcases fix * added test cases * doc changes * doc changes * invitation token fix * SSO General settings page changes * added sso button to signup pages * added helper text * fix * test case fixes * fix
21 lines
743 B
TypeScript
21 lines
743 B
TypeScript
import { Body, Controller, Param, Post, UseGuards } from '@nestjs/common';
|
|
import { OauthService } from '../services/oauth/oauth.service';
|
|
import { MultiOrganizationGuard } from 'src/modules/auth/multi-organization.guard';
|
|
|
|
@Controller('oauth')
|
|
export class OauthController {
|
|
constructor(private oauthService: OauthService) {}
|
|
|
|
@Post('sign-in/:configId')
|
|
async signIn(@Param('configId') configId, @Body() body) {
|
|
const result = await this.oauthService.signIn(body, configId);
|
|
return result;
|
|
}
|
|
|
|
@UseGuards(MultiOrganizationGuard)
|
|
@Post('sign-in/common/:ssoType')
|
|
async commonSignIn(@Param('ssoType') ssoType, @Body() body) {
|
|
const result = await this.oauthService.signIn(body, null, ssoType);
|
|
return result;
|
|
}
|
|
}
|