https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • Signing up a user with userMetadata in Flutter
    g

    goldyman

    12/23/2022, 10:50 PM
    Trying to understand where the userMetadata from the signUp call can be used and how. Is it just for the email template? Can I save this data in my public.profiles table? Can it be read in a trigger function? For example I would like to request 2 more fields for the user when signing up, say birthdate and username. Can I create a function on insert of auth.users, read from "new" object this metadata. If yes how to reference it. It's like I can log what I have in "new".
    g
    • 2
    • 8
  • help with migrating users table in mysql to auth
    c

    coinmaster47

    12/24/2022, 1:18 AM
    Hi, I have a _users table with id, username, email, password of about 300 records. How do i migrate this to the auth table. thanks
  • How to upload file using Laravel
    f

    Franks

    12/24/2022, 4:24 AM
    Hi everyone, I'm from Brazil, sorry for my poor english. I'm developing an application with Laravel, so I want to know if you threw any solutions of upload or storage with Supabase. 🥲
  • Can i cache result of some public tables on cdn (Postgrest)?
    e

    Elfhild

    12/24/2022, 4:49 AM
    Can i cache result of some public tables on cdn (Postgrest)? do i need anon key?
    g
    • 2
    • 2
  • Add Google Auth in Local Development
    h

    Hermes

    12/24/2022, 7:48 AM
    I'm trying out local development with supabase and having issues setting up google auth. I've made the required changes to my
    config.toml
    file but when I try to sign in, it creates the user in the actual supabase project and not my local environment.
    Copy code
    [auth.external.google]
    enabled = true
    client_id = "<same-as-actual-project-client-id>"
    secret = "<same-as-actual-project-secret>"
    g
    • 2
    • 6
  • Possible to have dynamic name in emails
    a

    ak4zh

    12/24/2022, 8:06 AM
    I am running my app at multiple domain (white-labeling) Is it possible to configure something like
    {{ .Hostname }}
    and possible use different SMTP credentials for each hostname so as to use their custom email address as well.
  • How do I use Polyscale with Supabase from the Client side?
    t

    tejas

    12/24/2022, 10:06 AM
    I have followed the integration article by Supabase detailing how to integrate Polyscale and Supabase. I have created the Polyscale cache and I have my connection url. However, when trying to access my database from the client side using the Supabase JS SDK, I have not been able to find a way to access my database through Supabase with my Polyscale connection URL, since I cannot specify it when I initialize the client. How can I use Polyscale's database connection url with the Supabase client SDK?
    s
    • 2
    • 1
  • signInWithOTP for password recovery
    f

    Florian

    12/24/2022, 11:53 AM
    Is there anything wrong with using
    signInWithOTP
    for password recovery? I like this approach more because it creates an account if none exists already. And I can reuse my existing signup code. https://supabase.com/docs/reference/javascript/auth-signinwithotp
    g
    • 2
    • 6
  • need help cresting signup email whitelist
    g

    gaIaxy

    12/24/2022, 12:22 PM
    getting
    Copy code
    {
      "code": 500,
      "msg": "Database error saving new user",
      "error_id": "a5430854-c948-485c-b0f6-c1be7203413b"
    }
    g
    • 2
    • 17
  • cant change role user
    u

    (FOX)

    12/24/2022, 12:23 PM
    Hi there I try to create user but session give null how I can fix this when fix this I try to create admin user and give all auth then, I try to write raw level security
    • 1
    • 5
  • Is there any way that we can know from which path of the website auth request is coming from?
    e

    EKI

    12/24/2022, 1:25 PM
    Like I have two path /staff and /partner both is for singnup and login, if the signup request is coming from /staff then do operation on staff table same for /partners
    u
    • 2
    • 6
  • Supabase Stripe Wrapper
    u

    49Ryann

    12/24/2022, 1:33 PM
    Does anyone know if this example is available at the moment? https://supabase.com/blog/postgres-foreign-data-wrappers-rust#connecting-to-stripe I tried the first query and it fails, do I need to upgrade somwhere? It's on a pro account also.
    Copy code
    create server stripe_server
    foreign data wrapper stripe_wrapper
    options (api_key 'sk_live');
    
    Failed to run sql query: foreign-data wrapper "stripe_wrapper" does not exist
    g
    • 2
    • 9
  • [Solved]How to access supabase db in local environment
    h

    Hermes

    12/24/2022, 3:20 PM
    I'm trying to build a project using supabase locally and I've spent like two days setting it up. Now another issue, database queries are not working as expected. I'm trying to run a simple query to return some data but it keeps returning an empty array even though there is data in the db.
    g
    • 2
    • 7
  • local development user passwords
    k

    ktosiek

    12/24/2022, 4:32 PM
    How can I set user's password when developing locally (with
    supabase start
    )? Can I access the mails local gotrue sends?
    g
    • 2
    • 2
  • Fetch foreign table data from subscriptions
    c

    chinds

    12/24/2022, 6:00 PM
    is it possible to fetch data from a foreign table when subscribing to updates? In my app on load I currently fetch customer data and also pull other data from a foreign table based on the customer id. In a separate effect I then create a subscription to the customers table to listen for changes. In this subscription is it possible to also pull data from a foreign table?
    g
    • 2
    • 4
  • ALTER TABLE foo ADD UNIQUE (bar) NULLS NOT DISTINCT syntax error
    m

    maxc

    12/24/2022, 6:44 PM
    In Postgres 15, the
    NULLS NOT DISTINCT
    syntax was introduced. However, when trying to use this like so
    ALTER TABLE foo ADD UNIQUE (bar) NULLS NOT DISTINCT
    we get this error
    Failed to validate sql query: syntax error at or near "NULLS"
    . Is this expected? Alternatively if the query is
    ALTER TABLE foo ADD UNIQUE NULLS NOT DISTINCT (bar)
    then we see the same validation error. Note that
    SELECT version()
    yields
    PostgreSQL 15.1 on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0, 64-bit
    as provided by Supabase.
    g
    • 2
    • 3
  • Can I call auth.getSession() immediately? (React - NextJS)
    f

    Florian

    12/24/2022, 7:07 PM
    When I call
    await supabaseClient?.auth.getSession()
    right after app start, can there be a race condition because the session hasn't loaded yet, or will this function return after loading has finished?
    g
    • 2
    • 4
  • Using Supabase with a Go backend
    c

    Cazineer

    12/24/2022, 8:07 PM
    Our backend is primarily written in Go and consists of a GraphQL gateway, along with a handful of services. Is there a Supabase Go library/SDK we can use to verify JWTs in the Go authentication layer? Previously, we used https://pkg.go.dev/firebase.google.com/go/v4 for Firebase. Thanks!
    g
    • 2
    • 8
  • redirecting password reset to specific uri based on device
    r

    R4Y

    12/24/2022, 8:11 PM
    Hello everyone I am making an api that will act as the platform that I’m making using fastify and supabase I have a react native frontend that will use the api for the users to use it Let’s say that i have also another react frontend that will use the same api I was wondering if there’s someway to redirect user processes (password change/ email address change…) based on the platform (android/ ios/ web…)
    c
    • 2
    • 1
  • FetchError 405 (api_supabasesession)
    p

    Pedro Fernandes

    12/24/2022, 9:14 PM
    Hello guys, I'm trying to publish my application statically through aws amplify and vercel. However, the application does not behave correctly, returning the following error: FetchError: 405 (/api/_supabase/session)
    g
    • 2
    • 1
  • Need help with max-age of images in cache
    m

    mikeladion

    12/24/2022, 9:14 PM
    Hello everyone! I have an issue with the cache max-age from Supabase storage, could anyone take a look to my question in stack overflow? https://stackoverflow.com/questions/74909768/supabase-cache-max-age-not-being-respected-by-chrome Basically, the max-age for which I set the image, does not work in browser. Thanks!!
    g
    • 2
    • 30
  • Cannot get relation with supabase-js
    k

    Keith

    12/24/2022, 9:16 PM
    Hello! I am having some problems retrieving a simple relation via supabase-js. Can't seem to find what I am doing wrong. I have the following schema setup: Table: public.users Columns: id, name, auth_user Relations: auth_user -> auth.user.id Table: public.playgroups Columns: id, name, owner Relations: owner -> public.users.id And I have the following query code:
    Copy code
    const { data, error } = await supabase
      .from("playgroups")
      .select(`
        *,
        owner (
          id,
          name
        )
     `)
     .eq("id", id);
    It always is returning the column owner as
    null
    . The following SQL works just fine:
    Copy code
    SELECT
      playgroups.name AS playgroup_name,
      users.name AS owner_name
    FROM playgroups
    JOIN users ON playgroups.owner=users.id;
    I can also see the relation is setup and working within the Supabase dashboard. Any chance anyone can spot what I am doing wrong here? Thanks for the help!
    c
    • 2
    • 4
  • connection refused to db using Jet Admin
    e

    Ethos

    12/24/2022, 10:00 PM
    Trying to connect Jet Admin to Supabase following their tutorial, and I have copied over the connection details yet they can't seem to connect to the db instance. Are there extra requirements for external connections that I am missing? The Connection Refused error makes it seem like the db is not externally reachable at the provided cname and they are passing the error straight from their SQL Alchemy client so I don't think it is their end. I have triple checked the url and port. Are SSL certs required?
    • 1
    • 1
  • How to set token expiry time in local Supabase?
    n

    Nin

    12/24/2022, 10:45 PM
    Title says it all, in the managed Supabase you can define the token expiration. I'd like to set mine to 30 seconds in local to test some auth edge cases, but I can't find the option to do so?
    h
    c
    • 3
    • 11
  • If getSession returns a session, does that mean a user is logged in?
    e

    eben

    12/24/2022, 11:13 PM
    If not, what does it concretely mean?
    g
    • 2
    • 1
  • Edge functions to compress image and save to database
    c

    Crownie

    12/24/2022, 11:25 PM
    Im looking to implement a edge function that, set the auth state,
    supabaseClient.auth.setAuth(req.header.get("Authorization"))
    receives an image with a description as body compresses the image, upload the image on the bucket / and the post info in a table is this possible? ( i heard you can't use npm packages, in deno so i don't know how to compress the image. ) and is there an easy way to implement this?
    n
    u
    • 3
    • 10
  • Do updates that violate RLS don't throw error?
    f

    Florian

    12/25/2022, 7:05 AM
    When I do an update on a row that I'm not authorized too, supabase doesn't return an error. It fails silently. Is that on purpose?
    c
    g
    • 3
    • 5
  • How to get the error status from AuthErrors?
    f

    Florian

    12/25/2022, 9:39 AM
    It seems like the JS client doesn't expose the status code of errors, at least it's not part of the TypeScript type. But I would like to use it to distinguish between different types of errors. Is there any other way to know if
    signInWithOtp
    failed because the user already exists?
    c
    • 2
    • 2
  • RLS Is not working. users.role() not found
    u

    (FOX)

    12/25/2022, 9:46 AM
    hi this is my query
    Copy code
    sql
    CREATE POLICY "if is admin" ON "public"."archive"
    AS PERMISSIVE FOR ALL
    TO public
    USING (users.role() = "supabase_admin")
    I try to if user has role supabase_admin he reach every action .
    s
    g
    • 3
    • 61
  • How to set supabase client options in NextJS Auth Helper
    h

    Hermes

    12/25/2022, 10:09 AM
    I don't see a way to set client options when creating a supabase browser client in nextjs auth helper library. It only allows setting cookie options. I'm developing in a local environment and I want to set it to not persist auth session.
1...787980...230Latest