-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Fix/signout not completing #74
Conversation
… event was never logged to the events table
… event was never logged to the events table
src/GoTrueClient.ts
Outdated
return { error }; | ||
} else { | ||
this._removeSession(); | ||
this._notifyAllSubscribers('SIGNED_OUT')'' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be a extra ''
at the end here
} | ||
return { error: null } | ||
return { error: null }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ;
to align formatting with the rest of the file.
src/GoTrueClient.ts
Outdated
} else { | ||
this._removeSession(); | ||
this._notifyAllSubscribers('SIGNED_OUT')'' | ||
return { error: null }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove ;
to align formatting with the rest of the file.
src/GoTrueClient.ts
Outdated
@@ -312,13 +312,20 @@ export default class GoTrueClient { | |||
* For server-side management, you can disable sessions by passing a JWT through to `auth.api.signOut(JWT: string)` | |||
*/ | |||
async signOut(): Promise<{ error: Error | null }> { | |||
this._removeSession() | |||
this._notifyAllSubscribers('SIGNED_OUT') | |||
// moved below... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove these comments too
Good catch! @burggraf Thank you |
if (error) { | ||
return { error } | ||
} else { | ||
return { error: null } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you revert these changes
What kind of change does this PR introduce?
Fixes: #73
Bug: signOut function is not completing and thus not creating logout events in log table #73
What is the current behavior?
signOut does not complete and no log record is written to the log table
What is the new behavior?
A log record is successfully written.