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

🐛 Checks for IE11 localStorage #54

Merged
merged 2 commits into from
Dec 20, 2016

Conversation

lboyette-okta
Copy link
Contributor

@lboyette-okta lboyette-okta commented Dec 20, 2016

localStorage and sessionStorage aren't available in some scenarios on IE11. This commit handles those scenarios by first attempting to fallback to sessionStorage, then cookies if sessionStorage doesn't exist.

Tested with widget in IE11 after starting using these instructions:
screen shot 2016-12-20 at 1 59 38 pm

Resolves: OKTA-105205

@lboyette-okta lboyette-okta force-pushed the lb-105205-localStorage-check branch from 48ef84c to 2777a9a Compare December 20, 2016 17:28
sessionStorage.clear();
return oauthUtil.getWellKnown(test.oa)
.then(function() {
return oauthUtil.getWellKnown(test.oa);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we making the getWellKnown call twice?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not necessary. I didn't remove it after a copy/paste from another test. Will remove

'test-idToken': tokens.standardIdTokenParsed
});
});
it('defaults to cookieStorage if localStorage nor sessionStorage is available', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "neither localStorage..." or "localStorage and sessionStorage are not..."

Copy link
Contributor

@rchild-okta rchild-okta left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

@lboyette-okta lboyette-okta merged commit 8177501 into master Dec 20, 2016
Copy link

@hor-kanchan-okta hor-kanchan-okta left a comment

Choose a reason for hiding this comment

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

:shipit:

@jmelberg-okta jmelberg-okta deleted the lb-105205-localStorage-check branch April 23, 2018 16:52
magizh-okta pushed a commit to magizh-okta/okta-auth-js that referenced this pull request Sep 23, 2019
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