https://supabase.com/ logo
Join Discord
Powered by
# help
  • j

    javorszky

    02/17/2022, 9:17 AM
    Hey folks! Are there plans to allow people to sign up / log in to supabase.com (the hosted service) with anything else besides Github as a provider?
    s
    • 2
    • 2
  • s

    silentworks

    02/17/2022, 9:51 AM
    Supabase signup with other providers besides GitHub
  • m

    malaleche

    02/17/2022, 2:16 PM
    is this possible? how can I deduct the credits by 1 ?
    Copy code
    await supabase
      .from('credits')
      .update({credits: 'credits - 1'})
      .eq('acc_id', '35')
  • e

    Eidur

    02/17/2022, 2:30 PM
    I'm a beginner who just started using Supabase (and postgres). I love it and for my needs, it feels like a step up from Firebase. *How do you work on Supabase with bigger projects? * - What external tools can you recommend? - What best are the best practices when it comes to Supabase development? So many of the articles I find are just about simple authentication or adding one function with basic row level security, but not too many dig much deeper than that. I am finding it difficult to keep track of my functions, row level security rules etc. I posted it here too: https://dev.to/jerzakm/what-is-your-supabase-workflow-beginner-question-2jd7
  • y

    ys

    02/17/2022, 2:33 PM
    I would suggest first fetching the amount of credits, subtract one and save it in a variable. Then update the value like you did in your message, but instead of using
    'credits - 1'
    you just put in your updated variable. Not sure if this is the right way, pretty new with this, but that's how I'd go about doing it.
  • m

    malaleche

    02/17/2022, 2:37 PM
    problem is that's not atomic, not transactional, I did it this way because I will have several threads doing the same for the same acc_id
  • y

    ys

    02/17/2022, 2:38 PM
    oh I see, in that case I am also stumped, sorry
  • m

    malaleche

    02/17/2022, 2:57 PM
    I think I can do it with functions , there I can run plain sql, I might do it that way
  • m

    malaleche

    02/17/2022, 2:57 PM
    thanks anyway @User
  • s

    Soko

    02/17/2022, 3:52 PM
    im trying to enable and connect to a pool for my db, but every time i enable pooling in the settings, it shows up as off if i refresh the page. anyone know why?
  • u

    user

    02/17/2022, 6:32 PM
    has anyone successfully set up supabase with a chrome extension manifest 3? I'm trying to get login with discord working with my extension and havent had any luck
  • c

    cdro

    02/17/2022, 8:01 PM
    I'm trying to query a JSON data but am running into the following issue. Looking at the docs it seems that this should be doable. Query:
    Copy code
    await supabase
        .from<definitions['pass']>('pass')
        .select(
          'id, json',
          {
            count: 'exact',
          }
        )
        .lt('json->expirationDate', new Date(now).toISOString().toLocaleString())
    Error:
    Copy code
    {
      message: 'invalid input syntax for type json',
      code: '22P02',
      hint: null,
      details: 'Token "-02" is invalid.'
    }
    s
    • 2
    • 21
  • r

    ragokan

    02/17/2022, 8:08 PM
    Hello, even though I did many research, I did not find a solution
    g
    w
    • 3
    • 46
  • r

    ragokan

    02/17/2022, 8:23 PM
    Subscriptions WSS Error
  • u

    user

    02/17/2022, 8:34 PM
    ayo what is the max simultaenous connections that can be made to supabase? and supabase thread safe?
  • c

    cookie mob

    02/17/2022, 8:39 PM
    Can I update table cell if the cell is in JSON format? Ex.g. [{"id":"1","name":"first"},{"id":"2","name":"second"}] now I want to add (append) {"id":"3","name":"third"}. Will it append it or will it override it and leave only the third one?
  • t

    Thomas van Broekhoven

    02/17/2022, 8:42 PM
    Anyone has any idea how to add multiple OAuth providers to one user account? If I am correct it is not out of the box (unfortunately), but was wondering if anyone has ever done this before? Thanks!
  • a

    aquaspirit

    02/17/2022, 10:35 PM
    I need help with getting user server side in NextJS, when redirected by auth provider. When logging in via Google provider, it redirects to dashboard page. The dashboard page is a protected route, rather than checking client side if user is logged in, I want to check server side. I know you have to set cookie but those solutions only work after logging in client side, I want to set cookie before it redirects to dashboard page.
    Copy code
    js
    const handleGoogleAuth = () => {
      supabase.auth.signIn(
        {
          provider: 'google',
        },
        {
          redirectTo: 'https://foo.com/dashboard',
        },
      );
    };
    // ...
    
    button.onclick = handleGoogleAuth // fire signIn
    
    // ... route to Dashboard
    
    // Dashboard page
    const Dashboard () => {
       return <div><h1>Dashboard</h1></div>
    }
    export const getServerSideProps: GetServerSideProps = async ({ query, req }) => {
      // req.cookie is empty object
      const { user, token } = await supabase.auth.api.getUserByCookie(req);
      // user and token are null, but that's because req.cookie is empty object
      return {
        props: {},
      };
    };
    export default Dashboard
    s
    • 2
    • 1
  • n

    Nafets

    02/17/2022, 11:27 PM
    ๐Ÿ‘‹, does anyone know of a tutorial that shows how to use the RESTful client with (bearer token) authorization? And how to deal with the token securely? Thanks and sorry if thatโ€™s a stupid question.
    s
    • 2
    • 4
  • s

    silentworks

    02/18/2022, 10:08 AM
    RESTful client with bearer token authorization
  • s

    silentworks

    02/18/2022, 10:25 AM
    Server side protected route before client request to set cookie
  • z

    Zozo

    02/18/2022, 11:43 AM
    Hello, I tried using OAuth for my AzureAD, for a single tennant application (internal). I followed the guide here (https://supabase.com/docs/guides/auth/auth-azure), to configure client id secret key and redirect uri. I use this code
    supabase.auth.signIn(
    {provider: 'azure'},
    {
    scopes: 'email',
    redirectTo:
    'https://login.microsoftonline.com/<tenantid>/oauthz/v2.0/authorize'});
    notice I replaced the
    common
    with my tenant-id
    <tenantid>
    but when I try to sign it I end up with :
    https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=xxxxredirect_uri=xxxx.supabase.co%2Fauth%2Fv1%2Fcallback&response_type=code&scope=openid+email&
    anyone done something similar before?
  • l

    Lothar

    02/18/2022, 4:13 PM
    Is there a playground for supabase where I can run JS queries against my data without having to spin up a nodejs server and check console output?
    s
    • 2
    • 2
  • n

    Net

    02/18/2022, 4:50 PM
    Is there some way to connect to the database as the user that owns the objects created through supabase, so that I can modify tables (ALTER TABLE) through an external tool like TablePlus?
    • 1
    • 1
  • u

    Unyxos

    02/18/2022, 4:54 PM
    Hello! I tried deploying the self hosted version today but am unsure whether it's normal I can't create orgs/projects, I searched in the previous messages and found something that seems to say it's not possible but it was already a bit old, any help on this? ๐Ÿ˜„
    s
    • 2
    • 3
  • n

    Net

    02/18/2022, 5:02 PM
    ALTER TABLE outside of supabase
  • r

    ragokan

    02/18/2022, 5:41 PM
    Hello, I want to ask about realtime data
  • r

    ragokan

    02/18/2022, 5:42 PM
    Do we need to be logged in to use realtime data?
  • r

    ragokan

    02/18/2022, 5:42 PM
    Because it gives me a 403 error when I try to use
  • l

    Lothar

    02/18/2022, 6:44 PM
    With this query:
    Copy code
    supabase
        .from('ingredient-prints')
        .select(`token,
            ingredients(key)
        `)
        .in('token', tokenIds)
    i'm getting back this response:
    Copy code
    {
        token: '3YXoTg2JT6Qb9m4P6wd2FYP9fFUoeTCt4KLK6BmpsFgf',
        ingredients: { key: 'doom-chalice-holo' }
      }
    Is there a way to get them like this?
    Copy code
    {
        token: '3YXoTg2JT6Qb9m4P6wd2FYP9fFUoeTCt4KLK6BmpsFgf',
        key: 'doom-chalice-holo'
      }
    (basically making the joint table column be at the same level)
    s
    • 2
    • 1
1...223224225...316Latest