All Questions

Tagged with
Filter by
Sorted by
Tagged with
8 votes
0 answers
766 views

Next JS - Supabase Error: AuthApiError: Invalid Refresh Token: Already Used

I'm trying to implement Supabase Auth in a Next JS project Now I'm encounter the following error which keeps repeating when I npm run dev: [AuthApiError: Invalid Refresh Token: Already Used]{ ...
Emad Naeim's user avatar
4 votes
2 answers
5k views

Nexts.js 13 + Supabase > What's the proper way to create a user context

I'm building an app with Next.js 13 and Supabase for the backend, and I've been stuck on figuring out the best/proper way to go about creating a context/provider for the current logged in user. The ...
Ryan Roberts's user avatar
4 votes
3 answers
2k views

Supabase reset password error: "Auth Session Missing"

The following function fails with error "Auth Session Missing" const { error } = await supabase.auth.updateUser({ password: password, }); After getting the reset password link on my mail ...
Deep Shetye's user avatar
3 votes
1 answer
1k views

Error using Next.js13 and Next/Supabase auth

Once I do the login this problem appears : Failed to parse cookie string: [Error: The edge runtime does not support Node.js 'buffer' module. Learn More: https://nextjs.org/docs/messages/node-module-in-...
Kilsuu -'s user avatar
3 votes
3 answers
249 views

Conditionally rendering UI based on cookies and supabase affects the rest of my program Next.js 13

I am trying to conditionally render an account button when a user is authenticated; render a login + sign-up button when the user is not authenticated as follows: My DesktopBar.tsx file import { ...
Daniel Craciun's user avatar
2 votes
1 answer
7k views

Redirecting to Origin URL with Next.js Route Not Working

I'm currently working on a Next.js application where I have a layout component inside the app directory. Within that component, I have a navbar client component. I'm attempting to implement a logout ...
Vladimirzb's user avatar
2 votes
2 answers
1k views

Handling Sign Up with Existing Email in Supabase

I'm working on a sign-up feature using Supabase and I want to provide feedback to the user if they try to sign up with an email that already exists in the system. However, I'm facing a challenge in ...
Vladimirzb's user avatar
2 votes
1 answer
339 views

Implementing Distinct Sign In and Sign Up Views with @supabase/auth-ui-react

I'm working with @supabase/auth-ui-react, and I'm trying to implement different types of authentication views, specifically for Sign In and Sign Up. I've looked at the documentation, but I couldn't ...
Vladimirzb's user avatar
2 votes
1 answer
949 views

Nextjs 13 Supbase auth redirect post social login not working properly

I am having some trouble getting Supabase auth working properly in NextJS 13. I would like some pages to be protected and if the user navigates to those pages, they should first be redirected to the ...
adeelmahmood's user avatar
  • 2,401
2 votes
2 answers
1k views

Error when importing supabase from createServerClient in generateStaticParams - Next js 13

I'm migrating my app from nextjs 12 to nextjs 13 and I'm having some trouble migrating my [...slug].tsx file. I started with a simple code snippet but I'm getting this error: Error: Invariant: Method ...
Emiliano's user avatar
  • 697
2 votes
1 answer
2k views

Redirect user after sign in in supabase and next js 13

I'm migrating to next js 13 and I'm wondering how can I perform a redirect after the user signs in with email and password. Currently, the session and user are returning well, but if I router.push('/')...
Emiliano's user avatar
  • 697
2 votes
1 answer
488 views

Where to place prisma seed.ts in Next.js 13 with appDir to apply seed data into supabase?

I am trying to apply seed data into supabase database from the Next.js 13 app that using appDir. In some tutorials and articles, you can place seed file in pages/api and once it runs next api server, ...
Vicky's user avatar
  • 21
1 vote
1 answer
886 views

Upload multiple images to Cloudinary and parses url to Supabase in Nextjs 13

I Want to Upload multiple images to Cloudinary and parses the URLs to Supabase in Nextjs 13 but when clicking Publish button, only 1 image is uploaded. I want to loop through all the media files and ...
Tan Huynh's user avatar
  • 125
1 vote
1 answer
339 views

TypeScript: "Type is not assignable to type 'never'" with Conditional Types in Supabase Query

Question I am working on a Next.js project using Supabase for the backend. I have defined some helper types to handle the responses from Supabase queries, but I'm running into a TypeScript issue that ...
Vladimirzb's user avatar
1 vote
1 answer
184 views

Trying to fetch data from supabase and building a gallery of images but get "Result is not iterable" in Next JS 13

I'm using Next JS 13 and got a table on supabase which I want to get my pictures to build a gallery. My code is the following: app/products/page.tsx import { createClient } from '@supabase/supabase-js'...
Wizwoke's user avatar
  • 11
1 vote
1 answer
183 views

Next.js Adding Port 80 to redirect URL after Google Aunthetication

I'm creating a web app using Nextjs 14 with a Supabase backend. However, after successful authentication, there's port 80 being appended on my URL which causes an error to be thrown. The URL after ...
Alvin's user avatar
  • 1,123
1 vote
0 answers
152 views

loading image from supabase storage return 403

I'm using Supabase with Nextjs, I have setup a custom loader for Supabase: export default function supabaseLoader({ src, width, quality, }: SupabaseLoaderProps) { const url = new URL( ...
Otman Bouchari's user avatar
1 vote
1 answer
122 views

Rendering fetched data from supabase in Nextjs13 App Directory

I successfully fetched data from supabase but I am unable to render them in my component , I tried implemented a component to hold the fetched data but i was unable to as it arose to other errors then ...
Revaycolizer's user avatar
0 votes
1 answer
959 views

Supabase Sign-Up: Confirmation Email Not Resent for Existing Email Address

I'm working on a sign-up feature using Supabase and I want to provide feedback to the user if they try to sign up with an email that already exists in the system. I found a relevant GitHub discussion ...
Vladimirzb's user avatar
0 votes
1 answer
73 views

How to solve Argument of type 'any[] | null' is not assignable to parameter of type 'SetStateAction<never[]>'. in nextjs 13

my project was created by Nextjs 13 based on Supabase database, am trying to fetch some data from supabase and use usestate to assign it to an variable ,, but am getting this error : Argument of type '...
Ahmed Wagdi's user avatar
  • 4,042
0 votes
1 answer
595 views

Issue with Next.js 13, Supabase, and Server Actions in layout.tsx

I'm working on a Next.js 13 application and trying to manage user authentication with Supabase. I'm running into problems when I attempt to check if a user is logged in using an asynchronous function ...
Vladimirzb's user avatar
0 votes
1 answer
301 views

Next-Auth in App Dir with Prisma on Supabase Postgres and SendGrid EmailProvider server throwing [MISSING_ADAPTER_METHODS_ERROR]

I am using Next-Auth with PrismaAdapter, Prisma connected to a Supabase Postgres database in a Next.js 13 App Dir project. I also have a SendGrid connection which I am unsure whether I configured ...
1voy's user avatar
  • 49
0 votes
1 answer
2k views

Protecting routes in nextjs using supabase

I implemented route protection by creating a protection page which I wrapped in the page to be protected whenever a user is not signed in, but if the user is signed in s/he is then taken back to the ...
Revaycolizer's user avatar
0 votes
1 answer
30 views

TypeError: supabase.from is not a function

I have a Next.js application, which I am trying to integrate with Supabase. Below is the initialisation of Supabase utils/supabase/server.js 'use server' import { createServerClient } from "@...
mukunda's user avatar
  • 415
0 votes
0 answers
117 views

Supabase and Next.js - How to make change password page accessible only to authenticated users

I have a next.js application and I am following the documentation for allowing users to reset passwords. So far, I built the password reset page and made it publicly accessible with a form asking for ...
AbedDoesCode's user avatar
0 votes
0 answers
170 views

Unable to make operations in supabase when stripe webhook fires

My ultimate goal is to do the following: have user choose stripe subscription and sign up (works successfully) when the invoice.payment_succeeded event fires, I want to increment a value in the db ...
COMMAND CENTER's user avatar
0 votes
1 answer
136 views

What is the right way to do a PUT in NextJS 13.4 API? (Response, NextAPIResponse, NextResponse) using the new App Router

What is the right way to do a simple PUT in NextJS 13.4 in the new App Router? The previous way of doing delete with using NextAPIRequest, NextAPIResponse, using if (req.method === 'PUT') , pulling ...
Octo Palm Tree's user avatar
0 votes
1 answer
208 views

What is the right way to do GET (all items or by a specific ID) in NextJS 13.4? (Response, NextAPIResponse, or NextResponse) using the new App Router?

What is the right way to do a GET (either getting all items or by a specific ID) in NextJS 13.4 in the new App Router? The previous way of doing delete with using NextAPIRequest, NextAPIResponse, ...
Octo Palm Tree's user avatar
0 votes
1 answer
2k views

What is the right way to do a DELETE in NextJS 13.4 API? (Response, NextAPIResponse, NextResponse) using the new App Router

What is the right way to do a simple DELETE in NextJS 13.4 in the new App Router? The previous way of doing delete with using NextAPIRequest, NextAPIResponse, using if (req.method === 'DELETE') , ...
Octo Palm Tree's user avatar
0 votes
0 answers
110 views

Redirect issue when accessing protected routes with an active session supabase

I am currently working on a middleware function in my Next.js application that handles authentication and redirects users based on their session status in supabase. However, I am encountering an issue ...
Abdulhameed Mustapha's user avatar
0 votes
1 answer
172 views

NextJS & Supabase - Wrong redirecting in auth routes

I have my app with nextjs and supabase deployed on render.com. All works as expected in local, but in prod, supabase redirects to http://localhost:10000 after login. Actually all my auth routes after ...
Carlos del Río Francés's user avatar
0 votes
0 answers
355 views

Authentication with Supabase and NextJS - getSession returns null at first, which leads to incorrect content rendering

I'm using supabase-js v2 for authentication inside a NextJS project. On page load/reload i always see a login page (for 2 seconds before render the correct component) even if a user is logged. The ...
vmaltarello's user avatar
0 votes
1 answer
229 views

Supabase Auth with the Next.js App Router tutorial throwing server error on createMiddlewareClient({req,res})

When following the Supabase Auth with the Next.js App Router tutorial, the initial development of the server throws an error My .env.local file is initialized with the correct url and key. Here is my ...
Nephter's user avatar
  • 147
0 votes
0 answers
74 views

scroll based pagination fetching not working in supabase using range(from, to)

i'm trying to leverage infinite scrolling by increasing the number of posts in the array of post by fetching more as the user scrolls towards the end of the page, i have the arguments for the ...
UY_SCUTI's user avatar
0 votes
1 answer
100 views

Supabase Serverside Datafetching share state with children Next.js 13

Can somebody explain to me what the best way of sharing states between a server component and child components is? I am recursively creating a file system type structure in Next.js 13 / react. My ...
StackMyFlow's user avatar
0 votes
1 answer
621 views

How to generate a static site with next.js 13 and supabase?

I'm currently working on a project using Next.js 13 and Supabase. I've been trying to implement Static Site Generation (SSG), but every time I build, it continues to render as Server Side Rendering (...
vlovin's user avatar
  • 1
0 votes
0 answers
23 views

getStaticProps returning undefined except I refresh my page

I'm having a problem in my nextjs app (13.0.5) When navigating through the website, product, seller and sellerProducts are undefined except I refresh the page... Ive tried fetching iit in the client ...
Emiliano's user avatar
  • 697
0 votes
0 answers
244 views

Why does a client-side exception occur when deploying nextjs13 to vercel?

I created a project with nextjs version 13.4.2, supabase, and react-query and am hosting it with vercel. Page ssr that receives data from the server? This error appears in the console: Error: ...
vlovin's user avatar
  • 1
0 votes
0 answers
129 views

Seeking Advice on Using PostgreSQL Triggers for Supabase Authentication in Next.js 13

I've been working on a Supabase project that involves authentication. My database structure includes a Profiles table that is linked to the auth.users table in Supabase. The Profiles table serves as a ...
Vladimirzb's user avatar
0 votes
0 answers
80 views

How to Correctly Authenticate a User Wtih NextJS and Supabase

I'm following the instructions provided in Supabase Auth with Next.js Pages I don't need to do any server side processing and just need a basic setup up and running on the browser client. My pages/...
vikram-s-narayan's user avatar
0 votes
1 answer
1k views

Supabase Authentication: Why Doesn't SignUp with Existing Account Log In When 'autoconfirm' Is ON?

I'm using the supabase.auth.signUp function in my code, expecting a logged-in session when the server has "autoconfirm" ON. However, when signing up with an existing account, it doesn't sign ...
Vladimirzb's user avatar
0 votes
0 answers
63 views

How to Obtain a Boolean Value for isSignedIn with @supabase/auth-helpers-nextjs in Next.js 13?

👋 Hey everyone, I'm working on a Next.js 13 project, and I'm using @supabase/auth-helpers-nextjs for authentication. In my layout.tsx file, I'd like to find a way to check whether a user is signed in ...
Vladimirzb's user avatar
0 votes
1 answer
828 views

Creating supabase client with Basic Auth

I need to interact with my supabase database from a Nextjs webhook route handler that is invoked by an external system. This is not from the browser so there is no user session or cookies available. ...
adeelmahmood's user avatar
  • 2,401
0 votes
1 answer
406 views

Cant create an Otp Login with Supabase

I am having a Hardtime with Supabase. whenever I try using the docs info to work on my page I get this error but according to the docs this is what they asked me to do import { ...
Victor Timi's user avatar
0 votes
1 answer
1k views

Nextjs 13.2.1 App Dir - Error: Page changed from static to dynamic at runtime

Bug Description I get an error when fetching data from Supabase using their ORM-like syntax. It first fetches the data, then the app crashes with the following error message. error - Error: Page ...
Roman's user avatar
  • 1
0 votes
1 answer
6k views

"TypeError: result is not iterable" -> Nextjs 13 data fetching with getStaticParams

I am fetching data from a supabase database with the new fetching methods of Next js 13. The fetching of my users to my listing page works well, and even when I click on their cards, the URL changes ...
nelakay's user avatar
  • 143
0 votes
1 answer
1k views

Fetching data with Supabase js and Next.js 13 returns an object (rather than array)

I am trying to fetch data from a Supabase table called "profiles" with Next.js 13 and the app directory. I am trying to take advantage of the new next.js fetching methods, my code looks as ...
nelakay's user avatar
  • 143
-3 votes
1 answer
63 views

GET http://localhost:3000/ 500 (Internal Server Error)

Yesterday I had to add some changes to my database table and all the data was lost, which it wasn't a problem because I'm just developing the project. The problem arises after I did that. I started to ...
Nolan's user avatar
  • 1