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

    franfernandez

    05/16/2022, 9:40 PM
    Hello. I'm having some problems to find the best way to auth on server side with NextJs integration. I'm trying to handle the token like is mentioned in the docu (https://supabase.com/docs/reference/javascript/auth-setauth)
    Copy code
    js
    export default async function handler (req, res) {
      const { access_token } = req.get('X-Supabase-Auth')
      const { user, error } = supabase.auth.setAuth(access_token)
    
      console.log('error', error)
      console.log('user', user)
    }
    but with NextJs middleware is becoming difficult,
    req.get
    is not defined. There are some documentation about this behaviour.
    n
    g
    • 3
    • 5
  • w

    WhatTheEffffMan

    05/16/2022, 11:51 PM
    I'm having trouble using email/password signup... Not getting any kind of feedback at all... https://pastebin.com/MFdyxfbm
    n
    j
    • 3
    • 21
  • f

    flux;

    05/17/2022, 1:28 AM
    I cannot sign into Supabase
    n
    b
    • 3
    • 11
  • i

    ian_

    05/17/2022, 2:23 AM
    getting error 403
    permission denied for table identities
    , probably because my RLS policy does a lookup in the identities table. how can I change the RLS policy to let someone lookup their own identity?
    n
    j
    • 3
    • 11
  • a

    AlanK

    05/17/2022, 5:56 AM
    I have a sveltekit app working with Supabase on Vercel. There seems to be an issue with Supabase js and Node 16:
    Copy code
    [POST] /api/auth/signin
    14:25:55:71
    2022-05-17T04:25:56.345Z    9224560d-5da7-4630-8ecf-2c93d7755e57    ERROR    Error: Dynamic require of "stream" is not supported
        at file:///var/task/index.js:12:9
        at node_modules/node-fetch/lib/index.js (file:///var/task/index.js:7860:35)
        at __require2 (file:///var/task/index.js:18:50)
        at node_modules/cross-fetch/dist/node-ponyfill.js (file:///var/task/index.js:8927:21)
        at __require2 (file:///var/task/index.js:18:50)
        at node_modules/@supabase/gotrue-js/dist/main/lib/helpers.js (file:///var/task/index.js:8981:41)
        at __require2 (file:///var/task/index.js:18:50)
        at node_modules/@supabase/gotrue-js/dist/main/GoTrueApi.js (file:///var/task/index.js:9090:21)
        at __require2 (file:///var/task/index.js:18:50)
        at node_modules/@supabase/gotrue-js/dist/main/index.js (file:///var/task/index.js:10191:39)
    2022-05-17T04:25:56.349Z
    Does anyone have any ideas?
    n
    o
    • 3
    • 10
  • m

    magoz

    05/17/2022, 6:20 AM
    The docs for setting up Twitter Login are outdated. The 3-legged OAuth is no longer available. I've tried what was suggested in this discussion: https://github.com/supabase/supabase/discussions/2270. The authentication redirection works, but when I get back to my site I get the following
    http://localhost:3000/?error=server_error&error_description=Error+getting+user+email+from+external+provider
    Am I doing something wrong? What's the right way of setting up Twitter Oauth? I'm attaching screenshots of my Twitter Dashboard setup.
    n
    s
    e
    • 4
    • 7
  • m

    Mattyfaz

    05/17/2022, 7:08 AM
    Using the
    @nuxtjs/supabase
    module, trying to setup a really basic auth. On my login page I have:
    Copy code
    javascript
    const login = async () => {
      await auth
        .signIn({
          email: email.value,
          password: password.value,
        })
        .then(() => {
          router.push("/");
        })
        .catch((error) => {
          return alert(error);
        });
    };
    On the index page I have the following calling middleware:
    Copy code
    javascript
    definePageMeta({
      middleware: "auth",
    });
    And the
    auth
    middleware is:
    Copy code
    javascript
    export default defineNuxtRouteMiddleware((to, _from) => {
        const user = useSupabaseUser()
        if (!user.value) {
            console.log("User not authenticated")
            return navigateTo('/login')
        }
    })
    When I login, the middleware fails and says "User not authenticated". However it actually has, if I refresh I am logged in. It's almost like the middleware just acts too quickly and needs to wait a second. Any idea how to resolve this?
    n
    • 2
    • 5
  • b

    BAN

    05/17/2022, 9:04 AM
    Am i doing something wrong or is it the supabase dashboard ? for past 3 days supabase anon key and service key was changed all of sudden, i haven't changed anything on supabase studio but the keys have changed 3-4 time in that duration... what can be the possible reason that they key is changed ? One thing is i have assigned roles to users in
    auth.users
    in supabase db. does changing role trigger it or is it due to something else.
    n
    o
    • 3
    • 10
  • a

    alexey.matveev

    05/17/2022, 10:54 AM
    Hello! 👋 I'm using supabase free plan, suddenly the open-API stopped working (about 7 days ago) The message is "Missing or invalid credentials" I've tried to change anon key - but it didn't work I observe some errors in DB which says "password auto failed for user postgres" - maybe something is wrong on supabase side, or I'm missing something? -- If someone have same issues would appreciate help 🙏 Here is my link to API which is currently not working https://dwdzonwbstsmajepwrjn.supabase.co/rest/v1/?apikey=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImR3ZHpvbndic3RzbWFqZXB3cmpuIiwicm9sZSI6ImFub24iLCJpYXQiOjE2NTI3ODM3ODUsImV4cCI6MTk2ODM1OTc4NX0.t3kRiEkgsdOhxHNic5Xj-U4pZMUmqCH4qxml8XOy84g
    n
    • 2
    • 2
  • d

    d33pu

    05/17/2022, 12:16 PM
    Has anyone built any custom integration around emails? Seems like Supabase doesn't have it. I've a usecase where when a record is inserted into table by some custom logic, send an email
    n
    o
    g
    • 4
    • 6
  • m

    Mattyfaz

    05/17/2022, 12:36 PM
    Does Supabase have any solution for Auth using just Username & Password?
    n
    o
    • 3
    • 5
  • a

    aslop2

    05/17/2022, 1:32 PM
    Hello everyone! recently started using supabase and i have a question about RLS Is it possible to use an array of IDs (strings) to authenticate? I tried the example bellow but i have something wrong in the syntax: (collection is my table which has a column of user_ids)
    Copy code
    exists (
      select 1
      from collection
      where auth.uid() in collection.user_ids
    )
    n
    r
    o
    • 4
    • 7
  • b

    Ben-jam-in

    05/17/2022, 5:43 PM
    Sorry for reposting this but seems to be more activity in here. Everything below has been done in JavaScript. If I have someone submitting a Username and UUID number... How do I get it to check and see if the UUID number has already been assigned to another Username? So if the UUID doesnt have a username then it will let the user submit their username, but if that UUID already has a username attached to it, then it will tell the user to try again. Any help would be greatly appreciated!
    n
    b
    • 3
    • 6
  • s

    sudoramen

    05/17/2022, 7:13 PM
    Hi all, I'm at a loss with trying to get realtime working. Replication is turned on for a table called
    messages
    but
    const sub = supabase.from('messages').on("*", console.log).subscribe()
    never prints anything. Is there something I'm missing? Thank you for any help!
    n
    r
    • 3
    • 7
  • j

    joshcowan25

    05/17/2022, 7:45 PM
    When I try to listBuckets(), I get an empty array, but I have one public bucket... const { data, error } = await supabase.storage.listBuckets() I also tried with getBucket('ressources'), (ressources being the name of my bucket) and I also get nothing
    n
    • 2
    • 4
  • s

    scottsaavarie

    05/17/2022, 10:35 PM
    Hey folks, I'm trying to generate types for my project following this guide: https://supabase.com/docs/guides/api/generating-types#generating-types-from-openapi-specification When I swap in my project url and anon key however, I'm getting an error (even when loading it in the browser),
    Missing or invalid credentials.
    n
    o
    d
    • 4
    • 7
  • a

    agileben

    05/18/2022, 1:42 AM
    $supabase.auth.signIn for provider:'azure' is giving me "Error getting user email from external provider" error on signIn for a new AD test account. Testing the same AD account on firebase auth works, so there is something up with how I'm using supabase auth or the gotrue server does not quite liking that account. Are there more detailed logs available from the server? I'm using the hosted server not local.
    n
    g
    • 3
    • 6
  • v

    VuNguyen

    05/18/2022, 2:37 AM
    How can I recursive query with Supabase? Or I have to write a postgresql function for that
    n
    g
    • 3
    • 3
  • h

    henryholtgeerts

    05/18/2022, 2:47 AM
    Hello everyone! Cross-posting this quesiton here, in case anyone can help out with auth suggestions: https://discord.com/channels/839993398554656828/932506573987790908/976314717612150795
    n
    • 2
    • 1
  • c

    casualgardener

    05/18/2022, 3:26 AM
    hi, what's are the storage needs of Supabase for self-hosting? I've spun it up on a 20GB VPS and its at capacity after running for a couple days without any real usage and a nearly empty DB, what's a recommended minimum size for a VPS to host Supabase?
    n
    • 2
    • 1
  • d

    Dots

    05/18/2022, 3:57 AM
    Getting some intermittent upsert errors when pushing to our DB
    n
    • 2
    • 2
  • n

    Needle

    05/18/2022, 9:05 AM
    Hello @Michie! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
    • 1
    • 2
  • d

    d33pu

    05/18/2022, 9:06 AM
    I want to throw errors and exceptions in plsql functions but I don't see auto suggestions for "Raise Exception" or "Notice" . Is it not supported in Supabase? Is there any workaround or otherways to do it? My usecase is I am building a function where I want to use it as an endpoint. I need to throw errors from function so it is visible on the endpoint.
    n
    g
    • 3
    • 5
  • j

    JohnC

    05/18/2022, 10:44 AM
    what is the vps requirements for self hosting supabase?
    n
    • 2
    • 3
  • n

    norman

    05/18/2022, 12:25 PM
    I faced an issue with graphql, after turn off/on
    pg_graphql
    extension. when I run the query in the sql editor, it will response me data. but when I try to use postman call the query it returns me an error. Sql Editor
    Copy code
    select graphql.resolve($$
        {
          usersCollection(first: 1) {
            edges {
              node {
                id
              }
            }
          }
        }
    $$);
    result
    Copy code
    {
      "data": {
        "usersCollection": {
          "edges": []
        }
      }
    }
    postman request
    Copy code
    query{
        usersCollection(first: 1) {
            edges {
                node {
                    id
                }
            }
        }
    }
    postman response
    Copy code
    {
      "data": null,
      "errors": [
        {
          "message": "Unknown field 'usersCollection' on type 'Query'"
        }
      ]
    }
    n
    o
    • 3
    • 4
  • h

    Hausik

    05/18/2022, 12:46 PM
    Hello, anyone have an idea why im getting "connecting to default project" in supabase studio? It rolls forever. Im using supabase in self hosted version. What I did, I've had a server with supabase running on it, connected to postgres on different server, then i took my docker-compose and .env files and just tried to start it on another server. I also connected it to the same postgres. Now i have 2 supabase running on different machines, connected to the same postgres. Can this be an issue why i cannot connect to default project on new server?
    n
    • 2
    • 1
  • p

    Paul

    05/18/2022, 1:37 PM
    is there an easy way to convert
    timestampz
    to just date / time / zone? I have tried
    .toLocaleString
    but it doesn't seem to work
    n
    c
    • 3
    • 17
  • n

    Needle

    05/18/2022, 3:43 PM
    Hello @avalanche! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
    o
    a
    • 3
    • 4
  • a

    avalanche

    05/18/2022, 3:48 PM
    Got couple of questions: 1.) Is it possible to connect to local instance with pgAdmin? When I enter my localhost:54322/postgres as host I get error. 2.) Anyone had issue with delete on cascade actually not deleting referenced items? 3.) What is the proper way to seed online instance? If I try to do it over API I get request exceeded error.
    n
    c
    • 3
    • 4
  • d

    derpwingduk

    05/18/2022, 4:29 PM
    were you able to figure this out? I'm facing the same issue myself
    n
    • 2
    • 5
1...271272273...316Latest