-
Notifications
You must be signed in to change notification settings - Fork 167
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
Error getting state from the storage #86
Comments
You could solve it by changing Lines 29 to 36 in 543ddde
utils.getResponseFromURL = function (url) {
var u = new URL(url);
var hash = {};
var search = {};
if (u.hash.indexOf('#') !== -1) {
hash = utils.parseQueryString(u.hash.substring(u.hash.indexOf('#')+1))
}
if (u.search.indexOf('?') !== -1) {
search = utils.parseQueryString(u.search.substring(u.search.indexOf('?')+1))
}
return Object.assign({}, hash, search)
} Which will then correctly parse both |
mastef
added a commit
to mastef/jso
that referenced
this issue
Feb 21, 2019
`getResponseFromURL` returns now a combined object in which both params from `#` and `?` are combined. This fixes cases such as in andreassolberg#86 and andreassolberg#45
Open
The only thing I wouldn't like about my solution though would be that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Thank you for great library. I've been trying to set auth with Instagram api and faced a little problem: instagram api sends me such parameters on redirect:
?state=07d17d32-aac7-421f-91fc-7a48f060c7e1#access_token=4708552857.7c4d118.2765b774374d4e5c96cd04f142ed086f
Since the query string contains both '#' and '?' symbols in different positions, utils.getResponseFromURL function fails to parse string properly and as a result I've got error of getting state from the storage.
The text was updated successfully, but these errors were encountered: