Skip to content

Commit 3fe342b

Browse files
committed
fix: Clear out the session before signup
1 parent b93351f commit 3fe342b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Auth.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ class Auth {
1414
this.persistSession = options.persistSession === undefined ? true : options.persistSession
1515

1616
this.signup = async (email, password) => {
17+
this.removeSavedSession() // clean out the old session before attempting
1718
const response = await superagent
1819
.post(`${authUrl}/signup`, { email, password })
1920
.set('accept', 'json')
2021
.set('apikey', this.supabaseKey)
21-
22-
this.removeSavedSession() // clean out the old session before returning
2322
return response
2423
}
2524

0 commit comments

Comments
 (0)