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

Add xhrChallengeType option #39

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

powmedia
Copy link

Browsers such as Safari intercept 401 Unauthorized responses with the Basic challenge. In client side apps using XHR requests this creates a browser authorization dialog before you can handle the error in your own code.

The way around this is to change the challenge type on XHR requests. See the below links for more info:
http://stackoverflow.com/questions/86105/how-can-i-supress-the-browsers-authentication-dialog/20221330#20221330
http://loudvchar.blogspot.ca/2010/11/avoiding-browser-popup-for-401.html

I've added the xhrChallengeType option which works around this. Also added a test and updated the readme.

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.

None yet

1 participant