bradamelton / saberfin.io

Issues for the https://saberfin.io website
0 stars 0 forks source link

on mobile always is logged out on open #41

Closed bradamelton closed 7 months ago

bradamelton commented 2 years ago

Auto login works, but is there a way we can save it better? State or cookie?

bradamelton commented 2 years ago

Is a popup being blocked?

I need to hook up to grab the console.

bradamelton commented 2 years ago

I believe this is because of FF's Enhanced Tracking Protection. Currently set to level 1. got the error on the remote console:

Request to access cookie or storage on "" was blocked because it came from a tracker and content blocking is enabled.

Lame. Not sure what to do yet. The whole point is that if they have logged in before, auto log in. If not, don't require them to log in until they want to.

bradamelton commented 2 years ago

This includes how FF determines if something is a "tracking resource":

https://developer.mozilla.org/en-US/docs/Web/Privacy/Storage_Access_Policy

bradamelton commented 2 years ago

I wonder if my localstorage request is missing the source url, so it thinks it is tracking across origins or something.

bradamelton commented 2 years ago

Ah, the error actually is:

Request to access cookie or storage on “https://accounts.google.com/o/oauth2/v2/auth?client_id=737785935925-pq4ap14jkppqqae1s489jmjo5i6dhkvq.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fsaberfin.io&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&state=4ff529da4ab34ffdb2a7fa7e218728e1&code_challenge=8BqlHju1GHcEWIOIvDn9UTPdDnR0SHVAGRrJ_LyYPUg&code_challenge_method=S256&prompt=none&login_hint=bradamelton%40gmail.com&response_mode=query” was blocked because it came from a tracker and content blocking is enabled.

bradamelton commented 2 years ago

I think I will need to wait until I set up the Identity Server in the saberfin domain. Users can turn off tracking privacy stuff to get around this.

https://medium.com/geekculture/unintended-impact-of-blocking-third-party-cookies-on-identity-use-cases-6c2be5153af0

bradamelton commented 2 years ago

In Firefox, turn off "Enhanced Tracking Protection". Will verify.