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

    PixelPage ᶠᵒˡᶤᶻᶻᵃ

    02/24/2022, 6:06 PM
    i want to store users by discord id
  • s

    Scott P

    02/24/2022, 6:10 PM
    Sign in with third party providers will trigger a sign-up event if the user isn't already registered: https://supabase.com/docs/reference/javascript/auth-signin#sign-in-using-third-party-providers
  • p

    PixelPage ᶠᵒˡᶤᶻᶻᵃ

    02/24/2022, 6:19 PM
    So, i want my bot to store the data on a database, without any discord auth because that wouldn't be user-friendly. If they want, they can login to the dashboard and manage they data- but only their. idk if that's possible
  • u

    user

    02/24/2022, 6:30 PM
    Hi guys, I was wondering if there is any way to have an Administrator on a website? I can't find something about Admin with the Auth from Supabase?
  • u

    user

    02/24/2022, 6:31 PM
    I need an admin to be able to write in a table where others should only be able to read from
  • u

    user

    02/24/2022, 6:31 PM
    is this possible some kind of way?
  • j

    joshcowan25

    02/24/2022, 6:44 PM
    One way would be to create a new column with roles or permissions and look for it on every route change. In my project, I have a "profile" table with a column "permission". Only users with 9 have access to administration options.
  • j

    joshcowan25

    02/24/2022, 6:46 PM
    Saving markdown
    • 1
    • 1
  • u

    user

    02/24/2022, 6:46 PM
    how would you check on that then?
  • u

    user

    02/24/2022, 6:46 PM
    sorry for potentionally stupid questions, I am quite new to this whole stuff
  • j

    joshcowan25

    02/24/2022, 6:52 PM
    It depends on the framework you are using and the type of project you do. But in my case, I have a "if" where I check if permission == 9, then I show the content of the page, and else, I redirect to login page. Also, I use Row Level Security to confirm that every sensitive modification to the site are made by a user with permission == 9.
  • u

    user

    02/24/2022, 6:54 PM
    I use react and the project is just kind of a hangman game page i guess. Did you do a special policy for RLS? Because thats one of the thing I do not get that much, I only know how to use the templates
  • p

    PixelPage ᶠᵒˡᶤᶻᶻᵃ

    02/24/2022, 6:54 PM
    Is there a way to create users without a email or something?
  • u

    user

    02/24/2022, 6:55 PM
    you can create them with phone numbers if thats better
  • p

    PixelPage ᶠᵒˡᶤᶻᶻᵃ

    02/24/2022, 6:55 PM
    not really...
  • j

    joshcowan25

    02/24/2022, 6:56 PM
    What do you want to use to authenticate users?
  • u

    user

    02/24/2022, 6:57 PM
    do you just want to use an username instead?
  • j

    joshcowan25

    02/24/2022, 7:00 PM
    Yeah, I get Row level security is not really easy. But, you have access to everything with dot notation, so I can check permission of a profile by looking where auth.uid() = profile.id and profile.permission = 9. If it returns true, the authenticated user will have access to the content. A good video to learn about RLS would be this one:

    https://www.youtube.com/watch?v=Ow_Uzedfohk▾

    It helped me a lot understanding RLS
  • u

    user

    02/24/2022, 7:01 PM
    thank you very much
  • p

    PixelPage ᶠᵒˡᶤᶻᶻᵃ

    02/24/2022, 7:18 PM
    So, i want my users to see their message count and server owners to edit their guild settings & co. The user should can do that without using an email adress or something like that. If he wants to use the dashboard, he can login (so an auth account will be created) and edit his data, but not the data from others
  • p

    PixelPage ᶠᵒˡᶤᶻᶻᵃ

    02/24/2022, 7:19 PM
    is that possible?
  • a

    AmusedGrape

    02/24/2022, 9:25 PM
    if you're making a bot and dash with supabase, its pointless to not have discord auth for a discord bot
  • l

    LORD WAREON

    02/24/2022, 10:08 PM
    How do I import a database
  • j

    joshcowan25

    02/24/2022, 10:15 PM
    How do you save markdown in Supabase? Just a Text field?
  • p

    Plexy

    02/24/2022, 10:19 PM
    does somebody know why my signup mails only get sent to some people?
  • p

    Plexy

    02/24/2022, 10:20 PM
    the user is created completely fine it just doesnt send the mail
  • b

    B0N3SY

    02/24/2022, 10:35 PM
    so i deployed the stripe subscription example on vercel
  • b

    B0N3SY

    02/24/2022, 10:35 PM
    could someone maybe give me a hint on this error
  • b

    B0N3SY

    02/24/2022, 10:35 PM
    i try to login with github and it kicks me to a localhost site
  • b

    B0N3SY

    02/24/2022, 10:51 PM
    vercel is throwing this out Failed to compile. ./pages/signin.tsx:51:58 Type error: Type 'Provider' is not assignable to type 'Provider | undefined'. Type '"linkedin"' is not assignable to type 'Provider | undefined'. 49 | const handleOAuthSignIn = async (provider: Provider) => { 50 | setLoading(true); > 51 | const { error } = await supabaseClient.auth.signIn({ provider }); | ^ 52 | if (error) { 53 | setMessage({ type: 'error', content: error.message }); 54 | } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Error: Command "yarn run build" exited with 1
1...229230231...316Latest