Skip to content

Commit

Permalink
fix oAuthLoginInterceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
mucsi96 committed Nov 7, 2023
1 parent a7dba32 commit 89fca59
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/src/app/http-interceptors/oauth-login-interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ export const oAuthLoginInterceptor: HttpInterceptorFn = (
) => {
const location = inject(Location);
return next(req).pipe(
catchError((error, caught) => {
catchError((error) => {
if (error.error?._links?.oauth2Login?.href) {
// location.assign(error.error._links.oauth2Login.href);
console.log('Redirecting to', error.error._links.oauth2Login.href)
return caught;
location.assign(error.error._links.oauth2Login.href);
}

throw error;
Expand Down

0 comments on commit 89fca59

Please sign in to comment.