https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • g

    garyaustin

    07/05/2022, 11:04 PM
    I m having an issue where my Next JS app
  • i

    imousart

    07/06/2022, 3:15 AM
    how did i implement supabase auth with nuxtjs v2 ?
  • i

    imousart

    07/06/2022, 3:15 AM
    any help 🙂
  • b

    bhaskar

    07/06/2022, 5:46 AM
    Hi team, i am getting
    server_error&error_description=Unable+to+exchange+external+code
    with google auth. i was working good, not sure what happened there
    d
    • 2
    • 2
  • t

    Theo (テオ)

    07/06/2022, 1:45 PM
    Why is an array of text of type unknown in the open api generated types?
  • s

    silentworks

    07/06/2022, 4:46 PM
    It's stated on the documentation page that that's a caveat of generating the types from OpenAPI.
  • p

    pwii

    07/06/2022, 6:45 PM
    I'm trying to do optimistic updates in my app. Is there a way to pass a signal to the supabase-js client? I could use my own client like axios or graphql-request, but the supabase-js clients makes it easier to query my db, so if there is a way, that would be great.
  • p

    pwii

    07/06/2022, 7:20 PM
    wooot. I think this is it https://supabase.com/docs/reference/javascript/select#aborting-requests-in-flight
  • t

    Theo (テオ)

    07/07/2022, 12:02 AM
    Wait no, it actually is not there. In the docs it says that arrays are wrongfully typed as string but I get an array of unknown ``unknown[]``
  • g

    garyaustin

    07/07/2022, 12:10 AM
    https://github.com/supabase/supabase/issues/3983
  • t

    Theo (テオ)

    07/07/2022, 12:19 AM
    thanks! that's the issue I'm bumping into. Other than the type story I'm completely blown away by supabase though. It literally makes you a 10x dev. Can't wait to see where the product is going in the future. (There's a teaser about a supabase native type solution... that would be dope)
  • b

    bhaskar

    07/07/2022, 3:42 AM
    Hi team, i restarted the supabase server and i started getting - https://kxllhojpvujcdnzodrwk.supabase.co/auth/v1/authorize?provider=google
    Copy code
    {
      "message": "An invalid response was received from the upstream server"
    }
  • b

    bhaskar

    07/07/2022, 3:42 AM
    @User i am stuck with this error. appreciate any help
  • g

    garyaustin

    07/07/2022, 3:48 AM
    Please contact SB support with the help tab or by email. The support shout out here does not go to them. Not sure who will see this here that could help if your instance is down.
  • m

    monicakh

    07/07/2022, 6:33 AM
    Please file us a support ticket at support@supabase.io including a screenshot of the error message and your project reference. You can find it in the URL
  • s

    silentworks

    07/07/2022, 9:52 AM
    We are actually working on improving typings with Supabase, for now you can extend the type and correct the unknown[] type with the correct type.
    Copy code
    ts
    import { definitions } from "./db-types"; // generated types which contains favourite_destinations as unknown[]
    
    type DbProfiles = definitions["profiles"];
    
    interface Profiles extends DbProfiles {
      favourite_destinations?: string[]; // correct the typing here
    }
    
    async function getProfile() {
      const { data } = await supabase
        .from<Profiles>("profiles") // using my extended type here
        .select("*")
        .eq("name", "James")
        .single();
    
      return data;
    }
  • m

    Marcos Abreu

    07/07/2022, 11:15 PM
    Hi, friends! I am getting error 401 "Invalid token: token contains an invalid number of segments" after trying to sign in. I did checked my anon API key in jwt.io and it says Invalid Signature. What is exactly the problem and how can I fix this? URL: https://notas-sytech.pages.dev/, using: Next.JS, Cloudflare Pages /Functions.
  • g

    garyaustin

    07/07/2022, 11:28 PM
    It would help to know what call is returning the 401. The signIn() call? If so sounds like you don't have the correct anon key, or did not init supabase client correctly.
  • m

    Marcos Abreu

    07/07/2022, 11:33 PM
    supabase.auth.api.getUser(token)
    g
    • 2
    • 16
  • m

    Marcos Abreu

    07/07/2022, 11:34 PM
    This token comes from the request, but the anon API key is sus because JWT.io says.
  • s

    stukennedy

    07/08/2022, 1:14 PM
    struggling with Supabase in SvelteKit with Typescript I'm trying to get the User demo code from the Supabase site working I get a problem with the action function typing and can't figure out how to fix it The downloadImage method is async but the
    use
    directive is expecting
    SvelteActionReturnType
  • s

    stukennedy

    07/08/2022, 1:42 PM
    I'm trying to follow this tutorial ... only with Typescript https://supabase.com/docs/guides/with-sveltekit
    o
    • 2
    • 12
  • d

    Devr

    07/08/2022, 2:40 PM
    Hey there ! Hi all , am using supabase for my projects and I also quite love it , there's a thing worrying me that supabase stores users session in localstorage ,so is this secure enough with respective of the database ? becoz I read that localstorage isn't good choice for users data , Like can attackers use UUID to connect to my database systems? Thanks!
  • o

    Olyno

    07/08/2022, 2:44 PM
    Svelte kit tutorial issue
  • j

    Juninhopo

    07/08/2022, 3:49 PM
    Hello, i need a help in my time. UTC-03:00 Help me in code please
  • j

    Juninhopo

    07/08/2022, 3:58 PM
    invalid: 15h53 correct: 12h53
  • g

    GlennS

    07/08/2022, 7:52 PM
    Hi there. Really enjoying Supabase and using it as the backbone of a SaaS company. I have a quick question. I modify the user on the server side including adding a bit of metadata. Is there a way to have the client fetch a new access_token with this new user info?
  • g

    garyaustin

    07/08/2022, 8:05 PM
    You might try auth.api.refreshAccessToken(refreshtoken) which returns a new session. https://github.com/supabase/gotrue-js/blob/9c6b466b1fee210dd42ed86261d57862d10ed2cb/src/GoTrueApi.ts#L465
  • g

    GlennS

    07/08/2022, 8:38 PM
    Thanks Gary. You are awesome. I was going down a far more convoluted rabbit hole! I will give this a try.
  • g

    garyaustin

    07/08/2022, 9:32 PM
    @GlennS Glenn, I may have missed the part you want to do this on the client (browser side) if so there is likely better way... auth.refreshSession() it uses the stored refresh token in the session and regenerates the jwt and sets localstorage, etc.
1...686970...81Latest