https://supabase.com/ logo
Join DiscordCommunities
Powered by
# javascript
  • s

    silentworks

    08/24/2021, 3:37 PM
    Did you follow all the configuration steps inside README?
  • x

    xo_rawr_XD

    08/24/2021, 4:12 PM
    Does anyone have some good code examples/public repos of using Supabase 3rd Party (Im using Facebook) Auth in an Expo React Native App? Having some trouble with redirects back to the app after log in. Thanks everyone.
  • b

    Browny

    08/25/2021, 5:21 AM
    Hi everyone. This could be a reach but I'm looking for someone who can help setup and build the back-end for my Nuxt application using Supabase authentication and storage. Paid opportunity for a senior full stack developer with experience in Vue/Nuxt.js, Node.js and Supabase. Please DM me if you're interested.
  • p

    Peanut

    08/25/2021, 8:35 AM
    How do I query and filter results with "array contains"? eg. find rows that have array "tags" containing "my tag"
  • s

    soedirgo

    08/25/2021, 8:57 AM
    You should be able to use
    .contains()
    with argument `["my tag"]`: https://supabase.io/docs/reference/javascript/contains
  • p

    Peanut

    08/25/2021, 9:10 AM
    Ta !
  • u

    user

    08/25/2021, 12:19 PM
    Hi, I am also looking for the solution to this
  • t

    ThePhilip

    08/25/2021, 5:24 PM
    Is there anyway to get the loading state of this variable ?
    const { user } = Auth.useUser();
    b
    • 2
    • 3
  • t

    ThePhilip

    08/25/2021, 5:24 PM
    I'd like to display a different screen while User is loading
  • t

    ThePhilip

    08/25/2021, 5:59 PM
    I need to redirect the page to login if the user isn't signed in but on first clientside render user is always null
  • b

    burggraf

    08/25/2021, 6:21 PM
    User Loading strategy
  • s

    stibbs

    08/26/2021, 10:28 AM
    Are you using SvelteKit? You use .env files differently with it (with vite).
    Copy code
    javascript
    import { createClient } from '@supabase/supabase-js';
    
    const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;
    const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;
    
    export const supabase = createClient(supabaseUrl, supabaseAnonKey);
  • s

    stibbs

    08/26/2021, 10:28 AM
    Maybe I'll write a sveltekit guide for this - although this was from memory the only thing that was different from the svelte guide they already have
  • l

    LuddensEkko

    08/26/2021, 10:38 AM
    hi, can l add additional infos here when signing up a user, (ex: country, age...etc)
  • s

    stibbs

    08/26/2021, 11:59 AM
    No I don't believe you can
  • s

    stibbs

    08/26/2021, 12:00 PM
    Hmm. You used to be able to see the auth tables in the supabase dashboard but that seems to be gone
  • s

    stibbs

    08/26/2021, 12:01 PM
    Although the update function looks like it lets you pass additional data, you could try this with
    signUp
    Copy code
    javascript
    
    const { user, error } = await supabase.auth.update({
      email: "new@email.com",
      password: "new-password",
      data: { hello: 'world' }
    })
  • s

    stibbs

    08/26/2021, 12:08 PM
    Nope, you can't. And really you probably shouldn't. You'd be better off storing any user profile/settings stuff in a table inside your public schema
  • s

    stibbs

    08/26/2021, 12:09 PM
    https://supabase.io/docs/reference/javascript/auth-update
  • l

    LuddensEkko

    08/26/2021, 12:13 PM
    oh ok, so i assume the way this would work is to sign up the user then prompt him to complete signup details
  • s

    stibbs

    08/26/2021, 12:14 PM
    Yep, but I'm struggling to find what the columns are in that schema... I swear it used to be visible in the dashboard. I think what you are supposed to do now instead is make your own table to house this data
  • s

    stibbs

    08/26/2021, 12:17 PM
    https://supabase.io/docs/gotrue/server/about#put-user
  • s

    stibbs

    08/26/2021, 12:18 PM
    Looks like you can indeed store whatever you want under "data" on the user
  • k

    kennethcassel

    08/26/2021, 12:18 PM
    yeah auth.users isn't in the dashboard anymore as you're not really supposed to manipulate it outside of the default columns. You can still see the table for auth.users in the sql editor if you run something like
    select * from auth.users
  • k

    kennethcassel

    08/26/2021, 12:19 PM
    they have a great doc for how you should handle the user data in relation to auth https://supabase.io/docs/guides/auth/managing-user-data
  • s

    stibbs

    08/26/2021, 12:21 PM
    Is the "data" array column in
    auth.users
    a legacy thing that shouldn't be used then?
  • k

    kennethcassel

    08/26/2021, 12:28 PM
    Not sure if it’s considered legacy or not but if you want to query user data via the api, then it needs to be in a separate table, and ideally with a primary key that references the id of the same user on the auth.users table
  • t

    ThePhilip

    08/26/2021, 5:54 PM
    How do I sign in user via the query params from the email confirmation url?
  • t

    ThePhilip

    08/26/2021, 5:55 PM
    Wait might've figured it out
  • t

    ThePhilip

    08/26/2021, 6:24 PM
    Copy code
    js
    if (window.location.hash) {
            var token = window.location.hash.substr(1).split('&')[2].split('=')[1];
            if (token) {
              supabase.auth
                .signIn({
                  refreshToken: token,
                })
                .then((info) => {
                  if (info.user) {
                    Router.push('/dashboard');
                  }
                });
            }
    here is my shite solution lol
1...131415...81Latest