https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • s

    shahpriyansh04

    09/14/2021, 6:20 PM
    something like that
  • s

    shahpriyansh04

    09/14/2021, 6:22 PM
    It will open a new browser window where we sign in and we retain the original state of the page
  • b

    Brock

    09/14/2021, 6:24 PM
    The page i sent is how to set up google authentication, though i am not sure about retaining page state? You can redirect back to the page after login but that will still refresh the page.
  • s

    shahpriyansh04

    09/14/2021, 6:24 PM
    Thanks for your help
  • s

    Scott P

    09/14/2021, 6:30 PM
    It's not something that's supported as part of the standard Supabase flow, but you could open a new window to a URL that handles the auth. When the auth completes, close the window, and watch for the
    onbeforeunload
    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.
  • s

    shahpriyansh04

    09/14/2021, 6:31 PM
    Thank you so much for your response I will look into it
  • s

    Subh

    09/15/2021, 7:46 AM
    Supabase Third Party Login
    I can get user's displayname?
  • m

    Mattias

    09/15/2021, 2:26 PM
    Problem with update()
  • m

    Michael Ketzer | streamgeist.com

    09/15/2021, 6:24 PM
    Is there a way to "left join" with the js lib?
    Copy code
    const { 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?
  • a

    apost

    09/15/2021, 7:59 PM
    hello!
  • a

    apost

    09/15/2021, 8:00 PM
    im running into some issues... im trying to upload an image to the Storage but i get this error
    {"statusCode":"400","error":"Bad Request","message":"headers should have required property 'authorization'"}
    l
    • 2
    • 7
  • a

    apost

    09/15/2021, 8:00 PM
    tried to find a solution on google but couldnt find anything
  • a

    apost

    09/15/2021, 8:01 PM
    im using this example https://supabase.io/docs/reference/javascript/storage-from-upload
  • u

    unix17

    09/15/2021, 9:30 PM
    Hello, guys, do you know how to search in table by letters no by words ?
  • s

    Scott P

    09/15/2021, 9:40 PM
    A word and a letter are both strings so... exactly the same both ways?
  • u

    unix17

    09/15/2021, 10:14 PM
    No exactly, just try to search user max if I put β€˜ma’ no results
  • s

    Scott P

    09/15/2021, 10:22 PM
    https://www.postgresql.org/docs/9.0/functions-matching.html
  • u

    unix17

    09/15/2021, 10:27 PM
    I already write a query select * from users where to_tsvector(username) @@ 'm:*'::tsquery;
  • u

    unix17

    09/15/2021, 10:28 PM
    But I still don’t understand how it should work with JavaScript 😞
  • s

    Scott P

    09/15/2021, 10:30 PM
    .like
    with
    %
    - https://supabase.io/docs/reference/javascript/like
  • u

    unix17

    09/15/2021, 10:34 PM
    Wow thanks, works like a charm
  • s

    Scott P

    09/15/2021, 10:38 PM
    In general, ts_vector gets most benefit if you have millions of rows (or you're doing a lot of
    AND
    or
    OR
    statements in your query). For anything less, pattern matching usually suffices
  • a

    apost

    09/16/2021, 6:15 AM
    Can someone help me here?
  • j

    jason-lynx

    09/16/2021, 6:45 AM
    can you paste your code here? it might be easier to identify the issue. 1) supabase initialisation 2) user signing in if any, 3) uploading an image
  • l

    lawrencecchen

    09/16/2021, 7:10 AM
    storage error
  • m

    Mattias

    09/16/2021, 9:12 AM
    Order of rows
    j
    m
    • 3
    • 11
  • n

    nkmnz

    09/16/2021, 7:47 PM
    Any ideas how to easily implement ssr auth for nuxt?
    supabase.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?
  • j

    JoshTheNerd

    09/17/2021, 1:30 AM
    Imagine using your supabase db for caching.
  • j

    JoshTheNerd

    09/17/2021, 1:30 AM
    I'm totally not gonna do that.
  • s

    seufernandez

    09/17/2021, 6:14 AM
    Hello Friends, have anyone made some FOLLOWERS FEATURE using Supabase?? Im trying to bring this feat to my app but I have no idea how can I do this haha
1...192021...81Latest