File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @supabase/supabase-js" ,
3
- "version" : " 0.35.3 " ,
3
+ "version" : " 0.35.4 " ,
4
4
"description" : " Supabase Realtime API" ,
5
5
"main" : " ./lib/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ class Auth {
18
18
. post ( `${ authUrl } /signup` , { email, password } )
19
19
. set ( 'accept' , 'json' )
20
20
. set ( 'apikey' , this . supabaseKey )
21
-
21
+
22
+ this . removeSavedSession ( ) // clean out the old session before returning
22
23
return response
23
24
}
24
25
@@ -78,8 +79,6 @@ class Auth {
78
79
. set ( 'Authorization' , `Bearer ${ this . accessToken } ` )
79
80
. set ( 'apikey' , this . supabaseKey )
80
81
81
- this . currentUser = null
82
- this . accessToken = null
83
82
this . removeSavedSession ( )
84
83
}
85
84
@@ -105,6 +104,8 @@ class Auth {
105
104
}
106
105
107
106
this . removeSavedSession = ( ) => {
107
+ this . currentUser = null
108
+ this . accessToken = null
108
109
isBrowser ( ) && localStorage . removeItem ( storageKey )
109
110
}
110
111
You can’t perform that action at this time.
0 commit comments