supabase.auth.onAuthStateChange not firing when inside iframe #6392
Unanswered
gameveloster
asked this question in
Questions
Replies: 1 comment
-
Hello, any solution to that yet? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When a Supabase-powered React app is inside an iframe,
supabase.auth.onAuthStateChange
does not fire when a user logs in.supabase.auth.token
is also not added to local storage on log in.The iframe pointing to the React app is injected into the webpage by a Chrome extension
chrome-sidebar
Let's say that the React app is hosted at
https://domain.com
.When a user logs in successfully, there are 3 possible cases I've observed:
❌ Case 1: Browser at
https://google.com
, injected iframe athttps://example.com
supabase.auth.onAuthStateChange
does not firesupabase.auth.token
is not added to Local Storage✔️ Case 2: Browser
https://example.com
, no iframe injectedsupabase.auth.onAuthStateChange
fires!supabase.auth.token
is added to Local Storage!✔️ Case 3: Browser and injected iframe both at
https://example.com
supabase.auth.onAuthStateChange
fires!supabase.auth.token
is added to Local Storage!How can we get
supabase.auth.onAuthStateChange
to fire when the browser is not athttps://example.com
?Thank you!!!
Beta Was this translation helpful? Give feedback.
All reactions