Skip to content

Commit b084e42

Browse files
committed
fix: fix loigc for auth user open login page
1 parent 65b855a commit b084e42

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/wwwroot/app.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,12 @@
254254
});
255255

256256
var _authReadyResolved = false;
257-
auth.ready.finally(function () { _authReadyResolved = true; });
257+
auth.ready.finally(function () {
258+
_authReadyResolved = true;
259+
if ($location.path() === '/login' && auth.isAuthed() && !auth.isTemporarilyAuthed()) {
260+
$location.path(auth.getDefaultUrl() || '/reports');
261+
}
262+
});
258263

259264
$rootScope.$on('$locationChangeStart', function (event, next, current) {
260265
var nextRelativeUrl = (next && next.split('#')[1]) || '/';
@@ -270,6 +275,7 @@
270275
}
271276

272277
var unauthenticatedAllowed = [
278+
'/login',
273279
'/signup/registration',
274280
'/signup/otp-validation',
275281
'/signup/confirmation',

0 commit comments

Comments
 (0)