https://supabase.com/ logo
Join DiscordCommunities
Powered by
# javascript
  • j

    jJ

    07/16/2022, 4:47 PM
    Hi all, I'm trying svelte+capaitor+supabase. So far everything is excellent, however I'm having difficulty with the google provider signin on android. ### successes On my web app, the following code redirects to google and then back again. All is good. ### fails On the Android it opens up a browser tab (left my app) and redirects to the web app still in the browser and my app remain without being signed in. Can anyone point my in the right direction for my app not to open a web browser and instead remain in the capacitor app.
    Copy code
    javascript
    const { user, session, error } = await supabase.auth.signIn({provider: 'google'});
    Kind regards, Joe
  • g

    garyaustin

    07/16/2022, 7:17 PM
    I've seen a couple of discussions on it. Most recommend using a webpage for landing and then redirecting with a "deep link" to your app. https://github.com/supabase/supabase/discussions/7093 I have a similar problem with my webapp in that the return opens a new window. I've gone with the otp token approach for confirmation, where they get the email and just copy the code back over to the app.
  • j

    jJ

    07/16/2022, 7:18 PM
    thanks! I'll take a look
  • l

    Lukas

    07/16/2022, 9:05 PM
    Any examples of what that might look like?
    g
    • 2
    • 1
  • g

    garyaustin

    07/16/2022, 9:33 PM
    Adding to an array
  • c

    castor

    07/16/2022, 11:24 PM
    anyone know any good tutorials or examples to implement Supabase with next.js
  • g

    garyaustin

    07/16/2022, 11:47 PM
    Have you looked thru any of these (from a google search) ?
  • j

    jJ

    07/17/2022, 12:03 PM
    Hi all, I have used a third party provider to log in (@codetrix-studio/capacitor-google-auth). Is it possible to sign the user into supabase using the given response:
    Copy code
    json
    {
        "email": "my@email.com",
        "familyName": "Surname",
        "givenName": "Firstname",
        "id": "xxxx",
        "imageUrl": "https://lh3.googleusercontent.com/a-/blahblah=s96-c",
        "name": "Full Name",
        "authentication": {
            "accessToken": "xxxx",
            "idToken": "xxxx",
            "refreshToken": ""
        },
        "serverAuthCode": "xxxx"
    }
    Many thanks in advance!
  • t

    Taofiq

    07/18/2022, 7:50 AM
    Hi Guys, I turned on real time updates for my tables but when i make a post request it does not update instantly
  • g

    garyaustin

    07/18/2022, 12:59 PM
    You will need to provide more info on your environment, what you have tried, etc. Please start a thread if you reply. Also "does not update instantly" ... does that mean it does update, just you are not happy with the timeframe?
    t
    • 2
    • 4
  • t

    Taofiq

    07/18/2022, 2:50 PM
    You will need to provide more info on
  • j

    Joshios

    07/18/2022, 5:35 PM
    What would be the best way to sync a countdown via supabase
  • f

    ferpintado

    07/18/2022, 11:42 PM
    I am trying to set up a webhook using supabase functions but it does not allow to set
    Authorization
    headers. Is it possible to trigger a supabase function with out defining it ?
  • g

    garyaustin

    07/19/2022, 12:10 AM
    I recommend you add more info in a thread here if a JS question, or move to general/sql depending on what you are asking. SB functions these days is unclear. A Postgres function (maybe called by rpc)? An SB Edge function? Not clear if trigger means a Postgres trigger or just a call. Then how would you use a function without defining it?
  • l

    lucasb

    07/19/2022, 3:45 AM
    Hello... trying to reference the auth users table via a field called 'owner' in the query below..
    Copy code
    js
    const { data, error } = await supabase
      .from('Comments')
      .select(`id, owner:users(id,email)`)
      .eq('post_id', params.id);
    I keep receiving an error
    Could not find a relationship between 'Comments' and 'users' in the schema cache
    I'm not really sure why as it appears I've setup the foreign key correctly. Any suggestions are appreciated
    g
    • 2
    • 18
  • r

    Recognized

    07/19/2022, 7:20 AM
    hello, I'm trying to subscribe to my database changes in realtime. however, it doesn't seem to work. I'm using a useRef hook in my Next app to subscribe to database changes, however, I'm not able to subscribe to the table for some reason. Here's my useEffect hook
    Copy code
    javascript
    useEffect(() => {
        let gameListener = supabase
          .from("games")
          .on("*", (payload) => {
            console.log("PAYLOAD", payload.new);
          })
          .subscribe();
    
        const subscriptions = supabase.getSubscriptions();
        console.log("SUBS", subscriptions);
    
        return () => {
          supabase.removeSubscription(gameListener);
        };
      }, []);
    here are some potentially useful screenshots to help
    g
    t
    • 3
    • 28
  • d

    danielcoglitore

    07/19/2022, 9:32 AM
    Hi does anyone can help on how can I query using the postgist extension ?
  • j

    jJ

    07/19/2022, 9:59 AM
    Hi all, I am returning to my signing with provider on android and have reverted back to using the supabase provided signup flow. The android signing with provider:google opens a browser window, that I am now providing a return url of "myApp://user" using deep links which works well. However, it leaves a browser tab open of the google signing page. I guess I could complete the login on the web app and then forward to the android app forwarding a refresh token, however this would still leave a browser tab open. I am wondering if this is a secure method or if there is a better suggestion. I have tried a 3rd party signing which works on both the web app and the android, but I couldn't find how to use the response to sign in to supabase with the details provided, so I abandoned this route. Thanks so much in advance for any pointers. Kind regards, Joe
  • g

    garyaustin

    07/19/2022, 12:52 PM
    realtime next
  • t

    Tekey

    07/19/2022, 2:49 PM
    Real Time Subscription Not Working With React
    k
    s
    • 3
    • 6
  • s

    shack

    07/19/2022, 6:41 PM
    what could be the reason that it logs before user, session, and/or error are defined (the user goes through with the provider sign in)
  • g

    garyaustin

    07/19/2022, 6:46 PM
    The process is going to come back to your redirectTo/home page unless signIn returns an error.
  • s

    shack

    07/19/2022, 6:47 PM
    then I guess I have some sort of anomaly
  • g

    garyaustin

    07/19/2022, 6:48 PM
    No, signIn still returns, the code after will run until the process calls your page again.
  • s

    shack

    07/19/2022, 6:48 PM
    so I theoretically should see it logged twice?
    g
    • 2
    • 5
  • s

    shack

    07/19/2022, 6:48 PM
    once before the auth and once after?
  • g

    GlennS

    07/19/2022, 7:37 PM
    Belated reply to this Gary: yes, this actually worked perfectly. Thanks for the help!
  • s

    sudoramen

    07/19/2022, 8:51 PM
    Is it possible to get realtime changes on Views or is that not a thing?
  • g

    garyaustin

    07/19/2022, 8:53 PM
    No
  • j

    Joshios

    07/19/2022, 10:13 PM
    Is there any way to call supabase when the page is closing in NextJS?
1...717273...81Latest