Skip to content

Commit

Permalink
fix: infinite login redirect loop
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Apr 27, 2023
1 parent 10385dd commit b80b586
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions changelog/unreleased/bugfix-infinite-login-redirect
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Infinite login redirect

We've fixed a bug where a user would fall into an infinite redirect between login and accessDenied page if a) the user had valid IdP credentials but was not permitted in ocis, b) the user has authenticated successfully but then got deleted in the meantime.

https://github.com/owncloud/web/issues/8928
https://github.com/owncloud/web/issues/7354
https://github.com/owncloud/web/issues/4677
https://github.com/owncloud/web/pull/8947
5 changes: 5 additions & 0 deletions packages/web-runtime/src/services/auth/authService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ export class AuthService {
}
if (isUserContext(this.router, route)) {
await this.userManager.removeUser('authError')
return
}
// authGuard is taking care of redirecting the user to the
// accessDenied page if hasAuthErrorOccurred is set to true
// we can't push the route ourselves, see authGuard for details.
this.hasAuthErrorOccurred = true
}

public async resolvePublicLink(token: string, passwordRequired: boolean, password: string) {
Expand Down

0 comments on commit b80b586

Please sign in to comment.