shahpriyansh04
09/14/2021, 6:20 PMshahpriyansh04
09/14/2021, 6:22 PMBrock
09/14/2021, 6:24 PMshahpriyansh04
09/14/2021, 6:24 PMScott P
09/14/2021, 6:30 PMonbeforeunload
event from the parent window: https://stackoverflow.com/a/9388451
When that event is triggered, you should be able to run the auth again, and as long as the user recently authenticated, it shouldn't prompt the user to auth again. I'm not sure if the page will be refreshed though.
Alternatively, do what I said in the first paragraph, and then use .session()
or .user()
as part of the callback to get the details:
- https://supabase.io/docs/reference/javascript/auth-session
- https://supabase.io/docs/reference/javascript/auth-user
That should work, as Supabase-js uses localstorage to store the user tokens.shahpriyansh04
09/14/2021, 6:31 PMSubh
09/15/2021, 7:46 AMSupabase Third Party Login
I can get user's displayname?Mattias
09/15/2021, 2:26 PMMichael Ketzer | streamgeist.com
09/15/2021, 6:24 PMconst { data } = await supabase
.from('giveaway')
.select('id, status, a (channel), b (channel)');
b
can be NULL on this query, is that possible with the js lib?apost
09/15/2021, 7:59 PMapost
09/15/2021, 8:00 PM{"statusCode":"400","error":"Bad Request","message":"headers should have required property 'authorization'"}
apost
09/15/2021, 8:00 PMapost
09/15/2021, 8:01 PMunix17
09/15/2021, 9:30 PMScott P
09/15/2021, 9:40 PMunix17
09/15/2021, 10:14 PMScott P
09/15/2021, 10:22 PMunix17
09/15/2021, 10:27 PMunix17
09/15/2021, 10:28 PMScott P
09/15/2021, 10:30 PMunix17
09/15/2021, 10:34 PMScott P
09/15/2021, 10:38 PMAND
or OR
statements in your query). For anything less, pattern matching usually sufficesapost
09/16/2021, 6:15 AMjason-lynx
09/16/2021, 6:45 AMlawrencecchen
09/16/2021, 7:10 AMMattias
09/16/2021, 9:12 AMnkmnz
09/16/2021, 7:47 PMsupabase.auth.api.setAuthCookie(req, res)
and getUserByCookie
only "Works for Next.js & Express (requires cookie-parser middleware)" according to https://github.com/supabase/gotrue-js/blob/4d57cb5/src/GoTrueApi.ts#L403 - shouldn't there be a more generic way to do this than one that requires a specific frontend framework?JoshTheNerd
09/17/2021, 1:30 AMJoshTheNerd
09/17/2021, 1:30 AMseufernandez
09/17/2021, 6:14 AM