-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Sometimes popup does not work but opens my page in it - query params are hijacked #727
Comments
I did some more testing (added console.logs to satellizer) and I can confirm that the problem happens in pollPopup function -> polling goes forever because although origin gets set, query and hash are never set. I have to figure out why is this happening sometimes, why is query/hash not read/set? Redirect from linkedin has those query string in it, so it should be read by pollPopup, but it is not. |
Ok, I managed to fix this one! I will describe the problem and solution so it may help someone else in the same situation. As I said above, redirect from linkedin was correct (has query params), but satellizer would not see any of them when trying to read them by polling popup's location. I fixed this by removing the race condition - I set redirectUri in satellizer to There is still one mystery unsolved - why did it happen only on some combinations of browser/OS? I am guessing that it has to do something with their speed/caching, but it is only a hunch. |
@Martinsos To further add my own thoughts to this, I found setting redirectUri to something like
|
Right @sahat, I agree that is the way to go! Maybe mentioning that in the README would be helpful? Right now it is not super clear that url can have path - at least it is not stated explicitly. Having an example of this could be useful. |
@Martinsos I wasn't sure where else to put it, so I added it to FAQ: https://github.com/sahat/satellizer#faq |
Great @sahat! May be worth noting that it can not contain any hash/query. |
I might have a problem related to this. this is my satellizer config:
apiUrl is The problem is that sometimes everything works as expected, but sometimes the client sends http post request to And this gives an error on my backend: @sahat Do you have any ideas how to solve this? |
@Martinsos - awesome find and thanks to @sahat also for the redirect suggestion! |
I'm using HTML5 mode with dynamic subfolders, so I had to do a little tweaking but this seems to work for me so far:
|
Hi @sahat, thank you for this amazing project, it saved me a lot of time :)!
I have been using satellizer for few months with no issues. I am using linkedin sign in and custom login. Backend is nodejs + express, while both frontend and backend are served on Dokku, Amazon.
Last few weeks I started having a problem with linkedin sign in: on Chrome/Linux and Safari/Mac combinations, it happens often that sign-in popup, after redirect from linkedin, ends up on that same redirect page but does not continue with authorization.
There are no errors/logs written, and to make it even harder to debug, it does not happen all the time, but maybe in 80% of cases.
On Firefox/Linux and Chrome/Mac combinations, all works fine! Also in localhost.
I can confirm that something goes wrong before sending request to my backend - authorization token is fetched from linkedin, redirect is sent, popup is actually redirected and then nothing happens, it stays there.
I am totally stuck, not sure anymore where to look - if you have any idea how to debug this or proceed, it would mean a lot. Thanks!
Video of error (errors at the bottom are produced by some extension): https://youtu.be/DUi9w7qZvqk.
The text was updated successfully, but these errors were encountered: