Skip to content

Commit 55b4177

Browse files
author
Sachin Maheshwari
committed
redirecting to app if already logged-in.
1 parent 9b50a0e commit 55b4177

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

web-assets/js/setupAuth0WithRedirect.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ const authSetup = function () {
163163
};
164164

165165
const postLogin = function () {
166+
if (isLoggedIn() && returnAppUrl) {
167+
auth0.isAuthenticated().then(function (isAuthenticated) {
168+
if (isAuthenticated) {
169+
window.location = returnAppUrl;
170+
}
171+
});
172+
}
166173
logger('calling postLogin: ', true);
167174
logger('callRefreshTokenFun: ', callRefreshTokenFun);
168175
if (callRefreshTokenFun != null) {

0 commit comments

Comments
 (0)