Code Monkey home page Code Monkey logo

Comments (8)

jan-tennert avatar jan-tennert commented on June 12, 2024

I don't think there is a built-in way to do that. I've seen solutions that included making a custom rpc function to check if an user with the specified email exists, but I'm not sure if thats the best way.

from supabase-kt.

eric-ampire avatar eric-ampire commented on June 12, 2024

That's weird

from supabase-kt.

jan-tennert avatar jan-tennert commented on June 12, 2024

I'd ask on the Supabase Github or Discord, they can probably help you more

from supabase-kt.

kibitheM avatar kibitheM commented on June 12, 2024

General info

What is your question?

How can I know if the user i'm trying to sign up already exist ? In my supabase dashboard, the user must confirm the email address before sign in, but that came with a challenge, when I'm trying to sign up a user that already exist there's no an error and the API return a User with an id, and honestly I don't know how to use this information to decide if the user has been create of no, I was expecting to have an error saying that the user already exist

Since you say the Api returns a user with an id, you may chose to follow what i did in my case... When creating a new user you should save the user id to another postgrest table, you can manually save their id when creating the user or even more conveniently, use a trigger function in supabase dashboard to watch for inserts in the user table and automatically update your table with the user id.. Now before you can sign in your user you should first check to see if their id has been stored in your users table. If the id is stored in your table you can sign them in, if not you know you are dealing with a new user and can direct them to any page of your choice. That is if i understood your question correctly.

from supabase-kt.

jan-tennert avatar jan-tennert commented on June 12, 2024

@eric-ampire Did you solve your problem?

from supabase-kt.

eric-ampire avatar eric-ampire commented on June 12, 2024

No unfortunately

from supabase-kt.

jan-tennert avatar jan-tennert commented on June 12, 2024

You could try this approach: https://github.com/orgs/supabase/discussions/1282#discussioncomment-5230475

from supabase-kt.

jan-tennert avatar jan-tennert commented on June 12, 2024

Closing due to inactivity. Feel free to reopen!

from supabase-kt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.