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

Fix token capture from the hidden iframe on refresh #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

afrith
Copy link

@afrith afrith commented Sep 24, 2019

This is a tricky one to explain.

It seems that the app inside the hidden iframe re-renders several times before the outer app tries to grab the token from it. This means that isRefreshingInIframe is no longer true in the TokenManager in the hidden iframe, so the <div id="token"> is not rendered. This means that the outer app can't find the token when it looks for it, and it gets stuck in an infinite loop of "checked for new token, not found yet".

This PR makes isRefreshingInIframe an instance variable in the TokenManager, so it persists through the refreshes, so the token div is still there inside the iframe when the outer app comes looking for it.

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.

1 participant