{{ message }}
Repository navigation
fix(auth): emit SIGNED_IN when set_session keeps a valid token - #1749
Merged
Merged
Conversation
set_session notified TOKEN_REFRESHED even when the access token had not expired, so restoring a session looked like a refresh.
o-santi
approved these changes
Oct 19, 2026
o-santi
approved these changes
Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes #1748.
set_session()notified listeners withTOKEN_REFRESHEDeven when the access token was still valid. auth-jssetSessionemitsSIGNED_INin that case andTOKEN_REFRESHEDonly after refreshing an expired token. Sync and async clients now do the same. An expired token still notifiesTOKEN_REFRESHED.Test plan
TOKEN_REFRESHEDand the new assertion failed. The expired-token case already passed.tests/test_helpers.pyandtests/test_errors.pypassed: 33 tests.ruff check,ruff format --check, andmypyonsrc/supabase_authandtestspassed.git diff --checkwas clean.make auth.testswas not run. It starts the auth Docker Compose stack. The existingtest_set_session_*cases intest_gotrue.pysign up against that stack.cc @olirice @silentworks