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

PWA keeps signing me out #7109

Closed
2 tasks
sachben91 opened this issue Mar 14, 2024 · 14 comments · Fixed by #7623
Closed
2 tasks

PWA keeps signing me out #7109

sachben91 opened this issue Mar 14, 2024 · 14 comments · Fixed by #7623
Assignees
Labels

Comments

@sachben91
Copy link

sachben91 commented Mar 14, 2024

Describe the bug

The PWA appears to sign me out a few after I've signed into it on my phone

Initial conditions

re-opening the PWA after around 16-24 hours
Environment:
production
Browser:
iPhone 12 mini
Wallet:
was signed in with metamask, using walletconnect

Reproduction steps

  • sign-in to PWA
  • exit the app and open it again to see if you are signed in (you likely are)
  • check again after 12-24 hours

Actual behavior

  • PWA has signed me out and I have to sign in again

Expected behavior

  • PWA does not sign me out of the app (unless 7 days elapsed without activity, per desktop app standards) and I am still logged in with my original login method

Reporter

@sachben91

Additional context

  • Some additional considerations. May be due to Increase Session Length on Magic and Server #5428 (or other areas), or some PWA storage issues.
  • Important to solve because users won't receive notifications if they're logged out (a core re-engagement flow)
  • Also, need to figure out because on Mobile, users don't usually get logged out, or Session Lengths for Native Apps are way longer. So that's worth discussion

We will need to make sure to fix on:

  • android
  • ios

and we probably need to double check each authentication type

@sachben91 sachben91 added bug Something isn't working refinement needs estimate labels Mar 14, 2024
@sachben91 sachben91 added this to the PWA follow-ups milestone Mar 14, 2024
@dillchen
Copy link
Contributor

dillchen commented Apr 8, 2024

cc: @zakhap @sachben91 @ForestMars, I added a bit of additional context

@ForestMars
Copy link
Contributor

This is needed for the v1.3.2 release (PWA FF + Mava Chat), added high priority tag.
@burtonator @ilijabojanovic

@burtonator
Copy link
Contributor

Quick update. I'm working on this now and trying to figure out what is happening.

I investigated running it on the iOS Simulator on MacOS but it won't allow app install so I can't install Metamask to verify.

I was going to change my system clock to verify but I can't do that now.

I'm going to try to debug this on my iPad and try to change the system time there to see if I can reproduce this.

There's also the issue of whether it's an issue on Android too. I authenticated on Android and will see if it expires my session.

I think once I debug on my iPad that I can fix this quicker.

@burtonator
Copy link
Contributor

I confirmed this is happening on android too. I'm going to try to debug it there as it's easier to debug remotely on android. It's probably the same bug.

@burtonator
Copy link
Contributor

Re-confirming on Chrome for the desktop. Logged in on Apr 27 at 10:15AM

@burtonator
Copy link
Contributor

OK. I know what the root cause is. The connect-id cookie is a session cookie so this impacts ALL browsers that authenticate this way. Not just metamask or iOS.

Now that I now it's easy to track down (and it's not related to a mobile device) it's going to be easier to resolve.

We're probably not specifying a session length or maybe it's just getting ignored.

@burtonator
Copy link
Contributor

This impacts social login too... the cookie is connect.sid for social login. I need to double check the name for the one for walllet connect.

@burtonator
Copy link
Contributor

What do we want to set as the expiration. Also, should we extend the expiration each time they log into the app or should it have a fixed cliff?

@dillchen
Copy link
Contributor

dillchen commented Apr 27, 2024 via email

@burtonator
Copy link
Contributor

@dillchen So basically you want a constant 14 day extension? I'm going to to test all auth providers to make sure we handle these properly.

@burtonator
Copy link
Contributor

I created a new ticket just for solving the cookie session length issue

What I'm going to do now is just set 14 days fixed if the session length isn't set:

#7595

@dillchen
Copy link
Contributor

dillchen commented Apr 29, 2024 via email

@burtonator
Copy link
Contributor

I have a PR for this but I need to figure out the interval for sessions. 2 weeks, 1 month, 1 year? I need an answer from the product team

@burtonator
Copy link
Contributor

This PR is done but I don't know what's up with master being ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants