Skip to content

Commit

Permalink
Merge pull request #2008 from timdeschryver/fix/auto-login-guard
Browse files Browse the repository at this point in the history
fix: auto login guard passes correct config id
  • Loading branch information
FabianGosebrink authored Sep 20, 2024
2 parents 20ac4eb + 7327887 commit b8e32c5
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class AutoLoginPartialRoutesGuard {

export function autoLoginPartialRoutesGuard(
route?: ActivatedRouteSnapshot,
state?: RouterStateSnapshot,
configId?: string
): Observable<boolean> {
const configurationService = inject(ConfigurationService);
Expand Down Expand Up @@ -106,9 +107,12 @@ export function autoLoginPartialRoutesGuard(

export function autoLoginPartialRoutesGuardWithConfig(
configId: string
): (route?: ActivatedRouteSnapshot) => Observable<boolean> {
return (route?: ActivatedRouteSnapshot) =>
autoLoginPartialRoutesGuard(route, configId);
): (
route?: ActivatedRouteSnapshot,
state?: RouterStateSnapshot
) => Observable<boolean> {
return (route?: ActivatedRouteSnapshot, state?: RouterStateSnapshot) =>
autoLoginPartialRoutesGuard(route, state, configId);
}

function checkAuth(
Expand Down

0 comments on commit b8e32c5

Please sign in to comment.