fix(auth): change auth to work with remote docker lab

This commit is contained in:
Nicolas 2025-10-30 14:23:52 -04:00
parent 2dd8bdb3c3
commit 78aec894ed
3 changed files with 57 additions and 57 deletions

View File

@ -17,7 +17,7 @@ ENV AUTHENTIK_AUTH_URL="https://auth.targo.ca/application/o/authorize/"
ENV AUTHENTIK_TOKEN_URL="https://auth.targo.ca/application/o/token/" ENV AUTHENTIK_TOKEN_URL="https://auth.targo.ca/application/o/token/"
ENV AUTHENTIK_USERINFO_URL="https://auth.targo.ca/application/o/userinfo/" ENV AUTHENTIK_USERINFO_URL="https://auth.targo.ca/application/o/userinfo/"
ENV TARGO_FRONTEND_URI="http://localhost:9000/" ENV TARGO_FRONTEND_URI="http://10.100.251.2/"
ENV ATTACHMENTS_SERVER_ID="server" ENV ATTACHMENTS_SERVER_ID="server"
ENV ATTACHMENTS_ROOT=C:/ ENV ATTACHMENTS_ROOT=C:/

View File

@ -12,7 +12,7 @@ export class AuthController {
@Get('/callback') @Get('/callback')
@UseGuards(OIDCLoginGuard) @UseGuards(OIDCLoginGuard)
loginCallback(@Req() req: Request, @Res() res: Response) { loginCallback(@Req() req: Request, @Res() res: Response) {
res.redirect('http://localhost:9000/#/login-success'); res.redirect('http://10.100.251.2:9011/#/login-success');
} }
@Get('/me') @Get('/me')

View File

@ -1,7 +1,7 @@
import 'reflect-metadata'; import 'reflect-metadata';
//import and if case for @nestjs/schedule Cron jobs //import and if case for @nestjs/schedule Cron jobs
import * as nodeCrypto from 'crypto'; import * as nodeCrypto from 'crypto';
if(!(globalThis as any).crypto) { if (!(globalThis as any).crypto) {
(globalThis as any).crypto = nodeCrypto; (globalThis as any).crypto = nodeCrypto;
} }
import { ensureAttachmentsTmpDir } from './config/attachment.fs'; import { ensureAttachmentsTmpDir } from './config/attachment.fs';
@ -46,7 +46,7 @@ async function bootstrap() {
// Enable CORS // Enable CORS
app.enableCors({ app.enableCors({
origin: 'http://localhost:9000', origin: ['http://10.100.251.2:9011', 'http://10.100.251.2:9012', 'http://10.100.251.2:9013'],
credentials: true, credentials: true,
}); });