https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • n

    nixfixbix

    01/11/2022, 8:19 AM
    Haven't tried discord auth but have you done all steps here? https://supabase.com/docs/guides/auth/auth-discord and set
    NEXT_PUBLIC_
    env vars?
  • n

    nixfixbix

    01/11/2022, 8:21 AM
    the undefined makes me think that some env variable is not set, e.g. supabase base url but I'm just guessing
  • d

    drex

    01/11/2022, 8:26 AM
    is there any specific name i should put?
  • d

    drex

    01/11/2022, 8:27 AM
    yea i did
  • n

    nixfixbix

    01/11/2022, 8:28 AM
    from the screenshot before it looked like you are using Next.JS so if you need to set env vars in the browser then you need to append with
    NEXT_PUBLIC_
    . See here https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser
  • d

    drex

    01/11/2022, 8:28 AM
    oh oki ty
  • n

    nixfixbix

    01/11/2022, 8:29 AM
    But do NOT add the service key to the browser
  • n

    nixfixbix

    01/11/2022, 8:29 AM
    only the anon key
  • d

    drex

    01/11/2022, 8:29 AM
    kk
  • n

    nixfixbix

    01/11/2022, 8:29 AM
    This is what I usually end up with
    Copy code
    NEXT_PUBLIC_SUPABASE_API_URL
    NEXT_PUBLIC_SUPABASE_ANON_KEY
    SUPABASE_SERVICE_KEY
  • j

    jaf

    01/11/2022, 8:30 AM
    In the
    auth.users
    table when I right click on the user's id field and select "copy cell content" it copies the the value of the
    instance_id
    field and vice versa. At least I think that's what happens
  • n

    nixfixbix

    01/11/2022, 8:30 AM
    so the service key is only exposed server side
  • d

    drex

    01/11/2022, 8:30 AM
    yea i think thats where i got it wrong im supposed to add the
    NEXT_PUBLIC
    before the variable name
  • d

    drex

    01/11/2022, 8:33 AM
    AYYY IT WORKED
  • d

    drex

    01/11/2022, 8:33 AM
    TYSM
  • n

    nixfixbix

    01/11/2022, 8:34 AM
    my pleasure
  • d

    drex

    01/11/2022, 9:05 AM
    what all value does user.user_metadata
  • d

    drex

    01/11/2022, 9:05 AM
    return?
  • f

    funny

    01/11/2022, 9:18 AM
  • d

    debabrata

    01/11/2022, 12:55 PM
    if i'm not mistaken, i think you have the freedom to associate some information with user_metadata
  • d

    debabrata

    01/11/2022, 12:55 PM
    you can even update it's value for a user as per your wish
  • d

    debabrata

    01/11/2022, 12:56 PM
    https://supabase.com/docs/reference/javascript/auth-update
  • d

    debabrata

    01/11/2022, 12:57 PM
    Also can anyone suggest a good analytics tool?
  • d

    debabrata

    01/11/2022, 12:58 PM
    I launched a product and I would like to know things like user growth charts and other metrics
  • c

    casey

    01/11/2022, 1:25 PM
    Hey I'm reading through the source code to get a feel for how supabase works. In the studio code I've noticed several comments on APIs that say
    Platform specific endpoint
    like: https://github.com/supabase/supabase/blob/d6deeb3916be7d8d9960782b8e8f14ab1ea7c93e/studio/pages/api/organizations/index.ts#L19. Is there a closed source version of the studio code where that logic actually lives? Its not a problem but I'm just trying to understand
  • d

    drex

    01/11/2022, 2:38 PM
    When I tried getting the values after using third party sign-in with discord, for some reason I get null values
  • d

    debabrata

    01/11/2022, 5:17 PM
    i think it's null by default. you can add some metadata about the user according to the needs of your app.
  • d

    debabrata

    01/11/2022, 5:22 PM
    it can be any object
  • d

    debabrata

    01/11/2022, 5:25 PM
    i haven't used user_metadata for storing info about any particular user since i prefer to simply add such information to the database itself.
  • d

    drex

    01/11/2022, 5:50 PM
    oh no im not talking abt meta_users, its the whole
    user
    object
1...178179180...392Latest