-
-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
supabase/ssr v0.0.9 setting autoRefreshToken to false breaks package #682
Comments
I see one issue with your code. The misspelling of autoRefreshToken - but maybe it's correct in your actual code. One thing I'm confused about is that you're using And if this code is being run on the server-side, then the error makes sense to me. I was able to reproduce it if I removed the |
@j4w8n Thanks for the reply. I have edited my initial post. Thanks for pointing that out! However the issue still remains. To clarify. This is only being used on Next using Pages. The code returns the same error client side. Full error log:
|
@robmarshall as @j4w8n stated, you would need to pass the |
So are you saying the docs need updated for |
Hi @silentworks Ah, I was of the understanding that that was for only server side, not client side. |
I thought that |
I'm finally catching up to what's happening lol. The options object is optional. However, once you declare the object, |
Yes it's a TypeScript issue, |
Is there a plan for fixing the optional params or is there a work around? I am looking at trying to pass in |
The workaround is to pass the |
I am using Supabase with Next JS and have the following function:
When I do not include the options object everything works properly.
When I add the
autoRefreshToken
key I get the following error:Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'get')
This seems to be an issue with the following object being overwritten: https://github.com/supabase/auth-helpers/blob/main/packages/ssr/src/createBrowserClient.ts#L65
EDIT: Removed typos/comments which confused things.
The text was updated successfully, but these errors were encountered: