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

    Deleted User

    10/12/2021, 11:33 PM
    How would one prevent injection from methods like
    .or()
    ?
    s
    s
    • 3
    • 15
  • c

    comfy

    10/12/2021, 11:54 PM
    really want to use supabase, but i am definitely addicted to Prisma + nexus graphql, is there a tutorial to explain how to achieve supabase + ?
    s
    h
    • 3
    • 6
  • s

    Steve

    10/13/2021, 12:15 AM
    injection
  • s

    silentworks

    10/13/2021, 12:34 AM
    Supabase with Graphql
  • a

    Andy | Spillhosting.no

    10/13/2021, 6:38 PM
    Anyone have a clue regarding this? I have to restart the supabase server almost daily now due to this.
  • l

    larryM

    10/13/2021, 8:06 PM
    Is it possible to not only subscribe to a row with real-time but also emit updates/changes to that specific row within that subscription.
  • v

    Victor Peralta

    10/13/2021, 9:19 PM
    You can put code that updates tables inside the subscription callback. However, it sounds like this logic might be better off in a db trigger
  • a

    alexandergaal

    10/13/2021, 11:05 PM
    Hi, I'm working on an app with Vue at the moment and used Supabase as my backend. I implemented OAuth logins and provided all the information needed to Supabase. As I tried it now, it seems like my app is just refreshing AFTER sign in. I also can't access
    user
    ,
    session
    or
    error
    after this statement:
    Copy code
    const { user, session, error } = await supabase.auth.signIn({
      provider,
    });
    user
    ,
    session
    and
    error
    are
    null
    . Any ideas?
  • a

    alexandergaal

    10/13/2021, 11:05 PM
    I sticked to the official documentation.
  • j

    Johann

    10/14/2021, 7:00 AM
    Yes you just check with auth.onAuthStsteChqnge() if someone is logged in or not
  • a

    alexandergaal

    10/14/2021, 7:14 AM
    so I just login with this statement and to populate my store I use
    auth.onAuthStateChange()
    ?
  • a

    alexandergaal

    10/14/2021, 9:13 AM
    It seems like this does not solve my problem. After I click
    Sign In with Facebook
    it redirects me to Facebook, which is perfectly fine. Back in my app it redirects me to a specific page I configured and after that it refreshes the whole app resulting to land at the onboarding again.
  • a

    alexandergaal

    10/14/2021, 9:14 AM
    I could push a current state if you want to see?
  • a

    alexandergaal

    10/14/2021, 9:55 AM
    You can see it here: (problem seems to be solved)
  • a

    alexandergaal

    10/14/2021, 9:55 AM
    Copy code
    store/auth.js
    
    actions: {
        async signInWithSocialProvider({ commit }, provider) {
          const { error } = await supabase.auth.signIn({
            provider,
          }, {
            redirectTo: '/platforms',
          });
    
          if (error) {
            console.error(error);
          }
    
          supabase.auth.onAuthStateChange((event, session) => {
            console.log(event);
            console.log(session);
            commit('setUser', event);
          });
        },
      },
  • j

    Jacob Miles

    10/14/2021, 11:16 PM
    is there any documentation on what "Auth Events" occur and when?
    s
    • 2
    • 2
  • j

    Jacob Miles

    10/14/2021, 11:16 PM
    specifically talking about the event in the onAuthStateChange???
  • s

    silentworks

    10/15/2021, 12:18 AM
    onAuthStateChange events
  • p

    Pierre Debruyne

    10/15/2021, 3:09 PM
    Hi ! I'm building my app with next JS, as i want to do a search text on multiple columns in the same table. As far as i understand, you have to create a a function that concatenate both field, but when i call this function i get this message : { "hint": "If a new function was created in the database with this name and arguments, try reloading the schema cache.", "message": "Could not find the public.search_posts(input) function in the schema cache" } But my function exist, i see it in the dashboard, and i had no error running it. I have no idea how to reload the schema cache and from what i found on google i'm suppose to do it on the postgresql server ?
  • m

    mikebarkmin

    10/15/2021, 3:20 PM
    The schema should automatically reload. Can you show the function definition?
  • p

    Pierre Debruyne

    10/15/2021, 3:27 PM
    Hi Mike ! Here is the function : create or replace function search_posts(keyword text) returns table(vehicules record) as $func$ select * from vehicules where to_tsvector(constructeur || ' ' || nom_propulsion || ' ' || nom) -- concat columns, but be sure to include a space to separate them! @@ to_tsquery(keyword); $func$ language sql; when i run the SQL command i get a success response
    g
    m
    • 3
    • 7
  • g

    garyaustin

    10/15/2021, 4:09 PM
    function not found
  • x

    Xzeta

    10/15/2021, 8:35 PM
    should i be doing something different ? I keep getting this after user successfully logins I would redirect to the home page
    Copy code
    Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in a useEffect cleanup function.
  • m

    mikebarkmin

    10/15/2021, 8:53 PM
    Probably yes. This should not happen. Can you show some code, which is called when or before this error occurs?
    x
    • 2
    • 14
  • k

    Kevin Tale

    10/17/2021, 6:51 PM
    hey folks! Is there a way to
    select
    and
    filter
    for multiple things in one request? Something like this in the idea
    Copy code
    const { data } = await supabase.from('profiles').select('username, email').filter('username', 'eq', username, 'email', 'eq', email);
    In this example, I want to returns all rows that matches username equals
    username
    OR email equals
    emails
    . Not necessarly rows that match both condition at the same time (but they could)
  • k

    Kevin Tale

    10/17/2021, 6:53 PM
    woops I've should have google better earlier... :p https://supabase.io/docs/reference/javascript/or
  • k

    khacvy

    10/18/2021, 2:47 AM
    You can try OR function https://supabase.io/docs/reference/javascript/or
  • p

    Puru

    10/18/2021, 4:14 PM
    HI, so I'm using Supabase firebase SDK in a sveltekit app. I'm getting this weird error in the results
    Copy code
    js
    {
      error: {
        message: 'FetchError: Request with GET/HEAD method cannot have body',
        details: '',
        hint: '',
        code: ''
      },
      data: null,
      body: null,
      count: null,
      status: 400,
      statusText: 'Bad Request'
    }
    s
    • 2
    • 1
  • p

    Puru

    10/18/2021, 4:14 PM
    Here's my query
    const results = await likesTable.select('*').eq('id', blogID);
  • p

    Puru

    10/18/2021, 4:21 PM
    Anyone knows how to fix this?
1...262728...81Latest