Skip to content

Commit

Permalink
Final touches
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Feb 23, 2024
1 parent 56fc094 commit 8e188f7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions website/src/middleware/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ export async function getKeycloakClient() {
return _keycloakClient;
}

export const getAuthUrl = async (redirectUrl: string) => {
const redirectUrlHttps = redirectUrl.replace('http://', 'https://');
logger.debug(`Getting auth url for redirect url: ${redirectUrlHttps}`);
export const getAuthUrl = async (redirectUrl: URL) => {
logger.debug(`Getting auth url for redirect url: ${redirectUrl}`);
const redirectUrlBare = removeTokenCodeFromSearchParams(redirectUrl);
const redirectUrlHttps = redirectUrlBare.replace('http://', 'https://');
const authUrl = (await getKeycloakClient()).authorizationUrl({
redirect_uri: redirectUrlHttps,
scope: 'openid',
Expand Down

0 comments on commit 8e188f7

Please sign in to comment.