Skip to content

fix(gotrue): sign out locally even if the server call fails - #448

Merged
Tr00d merged 2 commits into
supabase:masterfrom
fresh55:fix/gotrue-signout-local-session
Sep 29, 2026
Merged

Tr00d merged 2 commits into
supabase:masterfrom
fresh55:fix/gotrue-signout-local-session

Conversation

@fresh55

@fresh55 fresh55 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

closes #280

sign-out now clears the local session even if the server call fails, and the others scope keeps it, same as signOut in auth-js. unlike auth-js, 401/403/404 still throw, to keep the error contract.

@Tr00d Tr00d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there's only one assertion to add on a test

Comment thread packages/Gotrue/Gotrue.Tests/Authentication/SignOutLocalSessionTests.cs Outdated
@Tr00d Tr00d self-assigned this Sep 28, 2026
@fresh55

fresh55 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

@Tr00d good catch, the others scope test now checks the persisted session too

@fresh55
fresh55 requested a review from Tr00d September 28, 2026 14:31
@Tr00d
Tr00d merged commit b7a046b into supabase:master Sep 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parity(auth): SignOut() should clear local session even if remote call fails [from supabase-js]

2 participants