-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Unable to login on Safari #56
Comments
the bug is confirmed.. |
Can anyone prove a screen recording including persisted network tab open? 🤔 |
I cleared my cache etc. and then retried, the first time it went as far as the GitHub authentication. I logged in but it just went back to the home page. After that I tried to log in again and it was as before. See the attached. OpenDorLogin.movNot sure if you need anything else. |
Okay, I was able to verify that bug on my local Safari. |
After playing around a bit it seems like the current user.id session value gets lost during redirect, if I return a view from |
Same on iPhone Xs (iOS 14.4.2) IMG_0447.MP4 |
Thanks @poldixd . I still don't have a real idea why Safari can influence values in my serverside redis session store. 🤔 A possible solution I could imagine would be to render a view that redirects to the wanted page client side. Like the Laravel fallback one. |
Rant incoming 🤬 Go home Apple and put Safari in the trash! 🤯 The last idea really works ... return redirect()->intended(
route('home')
)->setStatusCode(200); Defining I will push and deploy that change in some minutes so you all can check if it really fixed it. |
seems like Safari does not accept the new session cookie with a redirect response - possibly because the URL before is a foreign domain and also redirects, some kind of user protection or whatever
Okay, that doesn't work on production ... 🤯 |
Okay, the last commit fixed it - at least for me. |
OK so it now works on my iPhone and iPad. Not tried the Mac yet. |
Yes, I can confirm. It works on iPad Safari and iPhone Safari. Perfect! |
fixed on MacBook safari too |
I wonder if this is all related to the cookie settings described here: zotonic/zotonic#902 |
Seems like the reason - but as I can't enforce a setting in Safari for all users this still seems like the only way. 😟 |
@Gummibeer - absolutely agreed that the current solution is reasonable and that JS may provide some benefits. still this issue has piqued my curiosity tho, so i'm going to be poking around at it a bit. as we've discussed I don't have access to Nova, so I wasn't able to run the full site. yet, with some clever hacking around stuff I've got a local dev version of the project working now. so at the very least I can poke at the Oauth issues safari is causing. UPDATE: It appears to be something related to SSLs as my local dev starts breaking after applying an SSL. While it works in Firefox still it does not work in Safari now. I think that's a good sign for chances of replicating it in a way to debug it. |
OHHHHHHHHH BOY. Is this an interesting discovery I have here and I wish I had an explanation - @Gummibeer. However from what I can tell it appears that the serviceworker (when run in safari) is what is eating the requests and cookies. I came about this as the cause by noticing two main clues here. The first being that the "Transfer Size" was listed as So with that in mind, I nuked my Safari cache and removed lines 2-14 of See here for working examples where ServiceWorker was disabled: I also have an HAR file exported that I could share to you as well if that helps. |
Yes, I've noticed also a different behavior between |
Okay, that's super strange as I explicitly apply the |
Steps to Replicate
$redirectTo = url(session()->pull('url.intended', route('home')));
return response()->redirectTo($redirectTo);
Steps to test my theory that service worker is making Safari sad:
|
So from what I've found it also seems that the service worker only loads when doing a prod build. So when I was just testing with |
@Gummibeer - you know what I think the issue might be a combination of two things. Safari treats the consecutive redirects as part of the same "request action" (for lack of better term) and that the final redirect is actually ending up on the home page -- Actually now I'm very confident this is the issue. |
Description
Unable to log in on Mac Safari and iPad Safari.
To Reproduce
On Mac and iPad Safari when I navigate to the opendor.me URL and click ‘sign-in’, the page appears to start to redirect to GitHub but does not complete and instead the OpenDor home page just refreshes. If I try to sign in on other pages e.g. Sponsors the same happens and the page just goes back to the home page.
The text was updated successfully, but these errors were encountered: