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

    binajmen

    01/04/2022, 7:39 AM
    Can't tell you, but you can typed your request with
    from<Type>(...)
  • j

    jaded

    01/04/2022, 1:03 PM
    hello, does anyone have any react app using github auth via supabase with protected routes that i can refer to or learn from? thank you
  • e

    eMeRiKa

    01/04/2022, 2:15 PM
    Is supabase store move working for you? I always have a 400 error "the resource was not found". Even if I can find the image in the table editor and the storage database
    b
    • 2
    • 27
  • b

    beru

    01/04/2022, 2:31 PM
    supabase storage 400 error
  • t

    the_thinker

    01/04/2022, 2:45 PM
    Hello can someone help me out? I'm running this but i'm not receiving any access token, and i cant figure it out.
    Copy code
    js
    const {createClient} = require('@supabase/supabase-js')
    
    const supabase= createClient('data,data')
    
    const signIn = async ()=>{
      let {error } = await supabase.auth.signIn({
      phone: 'phone no here',
      
    })
    if (error){
      console.log(error)
      return
    }
    }
    
    const verify = async()=>{
      let { session, error } = await supabase.auth.verifyOTP({
      phone: 'phone no here',
      token: 'thetoken'
      
    })
    
    }
    
    verify()
  • a

    anand

    01/04/2022, 3:13 PM
    bump. I have the same question 🙂
  • e

    eMeRiKa

    01/04/2022, 5:45 PM
    you can sign in your users with specific scopes. The information is here in the doc: https://supabase.com/docs/reference/javascript/auth-signin#sign-in-with-scopes
  • a

    anand

    01/04/2022, 5:46 PM
    Ah excellent, thanks!
  • d

    dohman

    01/04/2022, 8:33 PM
    Hey folks, I've been having a great time using Supabase but I'm stuck when reading from the database. I'm trying to read a list of e-mail addresses but my console log says; "TypeError: column.split is not a function". Anyone got a clue?
    Copy code
    js
    testGetEmails: async function () {
          const customersRequestTest = await supabase.from('customers').select(['customer_email_address', 'license_active'])
            if (customersRequestTest.error) throw customersRequestTest.error
            for (const supabaseCustomerTest of customersRequestTest.data) {
              
    console.log(supabaseCustomerTest.customer_email_address);
            }
        },
  • s

    Scott P

    01/04/2022, 8:36 PM
    Columns isn't an array, it's a string
  • d

    dohman

    01/04/2022, 8:42 PM
    @User Thanks! So glad that it's just a minor inconvenience in my code 😅
  • t

    the_thinker

    01/05/2022, 10:29 AM
    Hi, apologies for reposting but does anyone have any idea why im not getting the access token?
  • d

    dohman

    01/05/2022, 1:02 PM
    Me again. I'm trying to get 2 columns from supabase (customer emails & license bool);
    Copy code
    js
    const customersRequest = await supabase.from('customers').select('customer_email_address', 'license_active')
            if (customersRequest.error) throw customersRequest.error
            await this.sendEmailForm(this.form.userEmailAddress);
            console.log(customersRequest.data.join());
            for (const supabaseCustomer of customersRequest.data) {
              if (supabaseCustomer.license_active == true) {
                await this.sendEmailForm(supabaseCustomer.customer_email_address);
                console.log('kitica' + supabaseCustomer.customer_email_address);
               }
            }
    But for some reason, my 'check if license is true' logic isn't working.
  • s

    Scott P

    01/05/2022, 3:36 PM
    'customer_email_address', 'license_active'
    should be
    'customer_email_address, license_active'
    . The first argument of
    select
    is always a comma-delimited string if you're selecting multiple columns
  • f

    Fibrasek

    01/05/2022, 7:55 PM
    For those who are using SvelteKit, had problems with RLS on supabase calls in an endpoint? I had to move all supabase calls away from endpoints
    s
    • 2
    • 13
  • d

    dohman

    01/05/2022, 10:42 PM
    Thanks, worked like a charm!
  • d

    Deleted User

    01/07/2022, 10:36 AM
    i am facing cross error when update data
  • m

    Mike92988

    01/07/2022, 3:19 PM
    I'm trying to update a column with data type JSON, and it's also an array. anybody have any idea why I keep getting the "invalid input syntax for type bytea " error?
  • m

    Mac

    01/07/2022, 8:04 PM
    Hey peeps! I've been wondering why the Supabase Auth client (or perhaps the GoTrue client used under the hood) doesn't clear the auth data hash upon a successful redirect to a "non-standard" URL, ie. one that doesn't match the default URL's root route. In other words, if I set
    redirectTo
    to
    http://localhost:3000/foobar
    , upon successful auth I will be taken to
    http://localhost:3000/foobar#access_token=123abc&expires_in=3600&you_get=the_idea
    , and that's it, hash will stay there.
    • 1
    • 5
  • b

    bent

    01/08/2022, 1:33 AM
    Is it possible that
    supabase.auth.onAuthStateChange
    is broken? The callback I provided is never called, not when I log-in, sign-up or log-out.
  • b

    bent

    01/08/2022, 3:22 AM
    Yeah it just seems to flat out not work
  • b

    bent

    01/08/2022, 3:24 AM
    Also realtime seems to not work either? I can see in dev tools that I have an open web socket connection and I can see the heartbeats, access tokens and phoenix replies being sent, but the stuff I actually subscribed to does not arrive
  • v

    Vinzent

    01/09/2022, 11:13 AM
    Is your RLS working correctly?
  • b

    bent

    01/09/2022, 5:28 PM
    I'd hope so the RLS policy for select is just
    true
  • v

    Vinzent

    01/09/2022, 6:00 PM
    Hmm just the classics. Did you enable replication on the table?
  • b

    bent

    01/09/2022, 6:53 PM
    no
  • b

    bent

    01/09/2022, 6:53 PM
    i thought it was automatically enabled haha
  • b

    bent

    01/09/2022, 6:53 PM
    ty
  • b

    bent

    01/10/2022, 2:05 AM
    welp that didn't fix the problem lol - probably just moved it
  • l

    logemann

    01/10/2022, 11:48 AM
    i had this once where i accidentally had multiple (different) auth instances... played around too much with different initialisation methods
1...414243...81Latest