Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic token renew redirect to redirecturi #120

Open
msarvankmr opened this issue Apr 10, 2019 · 9 comments
Open

automatic token renew redirect to redirecturi #120

msarvankmr opened this issue Apr 10, 2019 · 9 comments

Comments

@msarvankmr
Copy link

Hi,

When the automatic token renews the page redirecting to call back page. Due to this when the user is working they are loosing their work when the token renews and it ended up in redirecturi page.

I expect this should be silent token renews as we are using model window for edit function and we are losing the state of the page and unsaved data during automatic token renews.
And i could see window.location.reload() during refreshLoginToken does this causing the issue?

private refreshLoginToken(): void {
        if (!this.user.loginCached) throw ("User not logged in");
        this.acquireToken(<any>this.context.config.loginResource).subscribe((token: string) => {
            this.user.token = token;
            if (this.user.authenticated == false) {
                this.user.authenticated = true;
                this.user.error = '';
                window.location.reload();
            } else {
                this.setupLoginTokenRefreshTimer();
            }
        }, (error: string) => {
            this.user.authenticated = false;
            this.user.error = this.context.getLoginError();
        });
    }

If you have any workaround please help me to fix it as this blocks our application?

@booboo123
Copy link

msarvankmr , I noticed the same issue. The renew should be silent and not refresh the page like the previous version. What is your solution?

@bryiantan
Copy link

I have the same issue, the app is using version 4.0.11. Rolled back to version 3.0.16, the token refresh worked without refreshing the page as before. I might try version 4.0.7 .. 4.0.10 when I have time :)

@sathyarajv
Copy link

@msarvankmr @bryiantan @benbaran Any solution identified?

I have the same issue on the latest version. Its always redirecting the user to the redirecturi mentioned on config.

@cannehag
Copy link

I have the same problem here. I can see the iframe when inspecting the page, but when the token is refreshed, it will reload the entire application and loosing state.

@gt-downunder
Copy link

Hoping to pop this back up to the top of the to-do list since it's still broken as of 4.0.12. When a user is not authenticated, the app performs the login, refreshes the entire application page, and redirects to the redirectUri in the config rather than the page that was being viewed.

I noticed that the "adal.login.request" key in the browser storage holds the value of the page that was attempted to be accessed and redirected back to.

I've tried versions 4.0.7 through to 4.0.12 and the only one that works as expected is 3.0.16. I'm reverting back to 3.0.16 and hope this gets fixed soon so I can update.

@cannehag
Copy link

@benbaran Any update here?

@bryiantan
Copy link

@benbaran Any update here?

I'm shocked, not a lot of people report about it. Are we the few people that using this control?

@benbaran
Copy link
Owner

benbaran commented Nov 27, 2019 via email

@Nitin304
Copy link

Hi All,

Is there any fix available for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants