Skip to content

Commit

Permalink
Check if savedRouteForRedirect is null
Browse files Browse the repository at this point in the history
If the default route redirect to a protected route the saved route for redirect is an empty string so after login the user get stuck in callback page without redirect, if we check for null instead the user get redirected to the root
  • Loading branch information
jerousseau authored Jul 27, 2023
1 parent 015bdac commit a6a5b32
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class AutoLoginService {
checkSavedRedirectRouteAndNavigate(config: OpenIdConfiguration): void {
const savedRouteForRedirect = this.getStoredRedirectRoute(config);

if (savedRouteForRedirect) {
if (savedRouteForRedirect != null) {
this.deleteStoredRedirectRoute(config);
this.router.navigateByUrl(savedRouteForRedirect);
}
Expand Down

0 comments on commit a6a5b32

Please sign in to comment.