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

    Fishball_Noodles

    01/11/2022, 12:35 PM
    how do you prevent supabase from rounding off my IDs
  • t

    tonic

    01/11/2022, 1:26 PM
    hello ! is there a way to verify .supabse.co domains?
  • t

    tonic

    01/11/2022, 1:26 PM
    google is asking me to verify it in order to user Google auth (oAuth)
  • e

    edmbn

    01/11/2022, 3:25 PM
    Hello everyone! Is there a way to use something like “createCustomToken” from Firebase? The reason is I would like to use another auth provider but once authenticated use everything else on Supabase.
    l
    • 2
    • 1
  • d

    drex

    01/11/2022, 6:01 PM
    why is supabase 3rd party auth returning null
  • l

    Lavka

    01/11/2022, 7:12 PM
    custom token
  • j

    jbergius

    01/11/2022, 7:24 PM
    Hi guys! Got a tricky thing going on that I need some help to think through. I got an SaaS-app running, with NextJS and Supabase. I'm using email + password authentication and I'm also using RLS with pretty much every policy taking use of the uid() helper function from Supabase. Now a different company(I will refer to them as Company B further on), which runs their own app with their own authentication system(JWT based), wants to integrate my app into theirs and I cant find of any good way to make the onboarding and signin-flow work as smooth as possible. I'd like the onboarding flow to create a supabase-user in my database and I must therefore recieve an email and a password from the user, everything fine so long. Does anyone have a good solution to how I can approach the problem that rises when the user visits my app the second time? I don't want to present a login screen to the user, as they're already signed in to Company B's app already, which I will validate through the JWT that they send along to my app.
    l
    e
    • 3
    • 26
  • d

    danny.m

    01/11/2022, 7:34 PM
    Has anybody else encountered this error when attempting to use 3rd party auth?
    Error getting user email from external provider
  • d

    dhruv_casa

    01/11/2022, 9:06 PM
    Yes, I'm stuck on this too. There doesn't seem to be a way to solve this. Google will most likely not verify your app
    s
    • 2
    • 1
  • s

    silentworks

    01/11/2022, 10:14 PM
    Google auth
  • k

    kresimirgalic

    01/11/2022, 10:28 PM
    Hey, i have problems with triggers for automatic creating new users in public.users table, i am using this sql https://database.dev/handle-new-user
  • k

    kresimirgalic

    01/11/2022, 10:28 PM
    I am getting this error
    Copy code
    code: 500
    error_id: "4fe56c6f-1db2-4f36-b23e-01a21712e303"
    msg: "Database error saving new user"
    s
    • 2
    • 11
  • k

    kresimirgalic

    01/11/2022, 10:29 PM
    this is my custom SQL
    Copy code
    create or replace function public.handle_new_user() 
    returns trigger as $$
    begin
      insert into public.users (id, avatar, first_name, last_name)
      values (new.id, new.raw_user_meta_data->>'avatar_url', new.first_name, new.last_name);
      return new;
    end;
    $$ language plpgsql security definer;
    
    create trigger on_auth_user_created
      after insert on auth.users
      for each row execute procedure public.handle_new_user();
  • k

    kresimirgalic

    01/11/2022, 10:31 PM
    any help on this?
  • j

    jensen

    01/12/2022, 3:27 AM
    help with trigger
  • d

    dohman

    01/12/2022, 8:21 AM
    What would be the simplest way to implement receiving push notifications (or regular notifications) any time a new db entry is created?
  • g

    grem

    01/12/2022, 9:20 AM
    Anything cool code-gen (typings) been done?
  • k

    kresimirgalic

    01/12/2022, 9:54 AM
    Hey guys, I have problems with upload image, i created a table users, and added bucket for images, also i added trigger and function for creating new user in table users, but something is wrong when i am uploading the image, and image dont want to upload. the error i got is this one
    Copy code
    error: "Key is not present in table \"users\"."
    message: "insert or update on table \"objects\" violates foreign key constraint \"objects_owner_fkey\""
    statusCode: "23503"
  • b

    BigDoofus

    01/12/2022, 11:18 AM
    Were you able to solve your issue with the triggers? I'm running into the same issue using google auth and getting the error_description=Database+error+saving+new+user error.
  • b

    BigDoofus

    01/12/2022, 11:25 AM
    Without the triggers, if I sign on without the triggers, I'm able to get the session + user info. But when I try to add in the triggers for the user. Keep getting the above error Using:
    Copy code
    create function public.handle_new_user() 
    returns trigger as $$
    begin
      insert into public.users (id)
      values (new.id);
      return new;
    end;
    $$ language plpgsql security definer;
    create trigger on_auth_user_created
      after insert on auth.users
      for each row execute procedure public.handle_new_user();
  • k

    kresimirgalic

    01/12/2022, 11:27 AM
    I also got this error later on, i got the same issue with triggers for table users
  • s

    silentworks

    01/12/2022, 12:00 PM
    Please look at the thread above where I address why @User is having that issue, you might find something useful in it otherwise create a thread and I will see if I can assist you there
  • b

    BigDoofus

    01/12/2022, 12:12 PM
    Looks like I was able to solve my issue, thanks!
  • k

    kresimirgalic

    01/12/2022, 12:19 PM
    @User can you share the solution?
  • b

    BigDoofus

    01/12/2022, 12:22 PM
    I ended up using, and that seemed to work with the inserting a new ser.
    Copy code
    -- inserts a row into public.users
    create function public.handle_new_user() 
    returns trigger 
    language plpgsql 
    security definer set search_path = public
    as $$
    begin
      insert into public.profiles (id, username, avatar_url)
      values (new.id, new.raw_user_meta_data ->> 'user_name', new.raw_user_meta_data ->> 'avatar_url');
      return new;
    end;
    $$;
    
    -- trigger the function every time a user is created
    create trigger on_auth_user_created
      after insert on auth.users
      for each row execute procedure public.handle_new_user();
  • c

    chipilov

    01/12/2022, 2:38 PM
    Has anyone seen this error whenever they try to call any auth functions: "An invalid response was received from the upstream server"
    • 1
    • 1
  • u

    user

    01/12/2022, 4:01 PM
    Hi Supabase!
  • u

    user

    01/12/2022, 4:02 PM
    All service are ok there? i'm stuck since 30minutes on "This may take a few minutes" after creating a project.
  • c

    chipilov

    01/12/2022, 4:11 PM
    I experience the same thing
  • u

    user

    01/12/2022, 4:12 PM
    Oki. 🙂 Thanks @User
1...192193194...316Latest