setAuth() function missing in supabase-js v2
See original GitHub issueBug report
setAuth() function is missing in the supabase-js v2 RC.
Describe the bug
setAuth() function is missing in the supabase-js v2 RC.
To Reproduce
Going through the functions & docs, there are no mentions of this function being removed. It throws an error because it’s not a defined function.
Expected behavior
Expecting that supabaseClient.auth.setAuth(cookie) to be an available function.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Version of supabase-js: 2.0.0@rc
- Version of Node.js: 17.2
Additional context
This function is necessary since it can be used to perform SSR pre-fetching with the user’s credentials.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
Release Notes | Supabase
Supabase.js v2 release notes. ... We're removing the signIn() method in favor of more explicit function signatures: ... Deprecated and removed setAuth() ....
Read more >supabase.auth.api.getUserByCookie() doesn't work in Next.JS ...
I'm trying to use supabase.auth.api.getUserByCookie() in getServerSideProps and the user is always null. export async function ...
Read more >Get supabase `user` server side in next.js - Stack Overflow
If you need to get the user in server-side, you need to set the Auth Cookie in the server using the given Next.js...
Read more >Pass Supabase Session Cookie to API Route to Identify User
setAuthCookie. We will create an API route to set a Supabase auth cookie. ... we can use the getUserByCookie function to get the...
Read more >How to Build a TodoApp using ReactJS, NextJS, and Supabase
Before we begin, you should be familiar with the basics of React.js and Next.js to get the most out of this guide. If...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

There is a typo, should be Authorization.
I have been using
setAuthin my test suite. This change has broken quiet a few of my test cases. While I could substitutesetAuthwithglobal Authorization headerfor some of my test cases, there are cases that I could not fix it.previously
setAuthwould triggeronAuthStateChangehandler withTOKEN_REFRESHevent. With current solution of creatingcreateClientwithglobal Authorization header, such events does not appear to be getting triggered.How does one set
realtime clientwithauthorization token. As per my limited understanding,realtimeauth gets triggered onauthStateChangeevent. However, setAuth expects channels to be already added to the channel list. So does that mean that I need to subscribe to the channels before I authenticate users. In such a scenario how does one deal with node-side testing ofrealtime-clientRLS test cases