Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Feb 28, 2024
1 parent 7ecb315 commit fd2f73d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions website/src/middleware/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import jsonwebtoken from 'jsonwebtoken';
import JwksRsa from 'jwks-rsa';
import { err, ok, ResultAsync } from 'neverthrow';
import { type BaseClient, Issuer, type TokenSet } from 'openid-client';
import {routes} from "../routes"

import { getConfiguredOrganisms, getRuntimeConfig } from '../config.ts';
import { getInstanceLogger } from '../logger.ts';
import { routes } from '../routes';
import { shouldMiddlewareEnforceLogin } from '../utils/shouldMiddlewareEnforceLogin.ts';

export const ACCESS_TOKEN_COOKIE = 'access_token';
Expand Down Expand Up @@ -48,9 +48,9 @@ export async function getKeycloakClient() {
}

export const getAuthUrl = async (redirectUrl: string) => {
const logout = routes.logout()
if(redirectUrl.endsWith(logout)){
redirectUrl = redirectUrl.replace(logout, routes.userOverviewPage())
const logout = routes.logout();
if (redirectUrl.endsWith(logout)) {
redirectUrl = redirectUrl.replace(logout, routes.userOverviewPage());
}
const authUrl = (await getKeycloakClient()).authorizationUrl({
redirect_uri: redirectUrl,
Expand Down

0 comments on commit fd2f73d

Please sign in to comment.