Skip to content

Commit

Permalink
fix: fixed a bug in the login process for the admin app (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
banders authored Jun 3, 2024
1 parent 56981ea commit 3642f5d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions backend/src/v1/services/admin-auth-service.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { pay_transparency_company } from '@prisma/client';
import axios from 'axios';
import { NextFunction, Request, Response } from 'express';
import HttpStatus from 'http-status-codes';
import jsonwebtoken, { JwtPayload, SignOptions } from 'jsonwebtoken';
import qs from 'querystring';
import { config } from '../../config';
import { KEYCLOAK_IDP_HINT_AZUREIDIR, OIDC_AZUREIDIR_SCOPE } from '../../constants';
import {
KEYCLOAK_IDP_HINT_AZUREIDIR,
OIDC_AZUREIDIR_SCOPE,
} from '../../constants';
import { logger as log } from '../../logger';
import prisma from '../prisma/prisma-client';
import { utils } from './utils-service';

enum LogoutReason {
Expand Down Expand Up @@ -119,7 +120,7 @@ const adminAuth = {
generateUiToken() {
const i = config.get('tokenGenerate:issuer');
const s = '[email protected]';
const a = config.get('server:frontend');
const a = config.get('server:adminFrontend');
const signOptions: SignOptions = {
issuer: i,
subject: s,
Expand Down Expand Up @@ -200,8 +201,6 @@ const adminAuth = {
return res.status(HttpStatus.OK).json(userInfoFrontend);
},



async handleCallBackIdir(req: Request): Promise<LogoutReason> {
const userInfo = utils.getSessionUser(req);
const jwtPayload = jsonwebtoken.decode(userInfo.jwt) as JwtPayload;
Expand Down

0 comments on commit 3642f5d

Please sign in to comment.