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

Prevent redirecting again in the middle of redirect (ORCID#1926) #1927

Conversation

kadet1090
Copy link

@kadet1090 kadet1090 commented Apr 7, 2023

This should hopefully be temporary fix for issue mentioned in #1926 where some of SSO clients like OSF or our Bridge of Knowledge have problems with users being unable to log in into the application. The issue is caused by the race condition of GTM and GTM timeout (4s) so as temporary solution I propose to simply allow only one call to the sendUserToRedirectURL which should fix the problem.

However proper solution is needed because setting 4s timeout as workaround for users that have addons blocking GTM does not seem like proper solution causing unnecessary delay for some users.

@kadet1090 kadet1090 changed the title Prevent redirecting againt in the middle of redirect (ORCID#1926) Prevent redirecting again in the middle of redirect (ORCID#1926) Apr 7, 2023
this.window.location.href = oauthSession.redirectUrl
this.inTheMiddleOfRedirect = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that we have 2 redirects, one is called by GTM library it self, and the other one is called by sendUserToRedirectURL.

So in reality the sendUserToRedirectURL is only call once, and that is why this boolean check does not work .

@leomendoza123
Copy link
Member

@kadet1090 We also agree, adding a 4 seconds delay is unfair to our users with add blockers.
And this 4 seconds delay should be consider only a temporal fix.

I have create a Trello ticket to followup with this issue on our boards
https://trello.com/c/gCAPBN4M/8576-qa-users-with-add-blocks-have-to-wait-4-extra-seconds-on-oauth-process

@amontenegro
Copy link
Member

Thanks a lot for your contribution @kadet1090! We found another way of fixing this and we are thinking about how to remove the 4 secs delay.

Thanks

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

Successfully merging this pull request may close these issues.

3 participants