Skip to content

Conversation

j4w8n
Copy link
Contributor

@j4w8n j4w8n commented Nov 23, 2022

What kind of change does this PR introduce?

Resolves the last remaining issue of, and closes supabase/auth-js#524

What is the current behavior?

After a user is logged out, the supabase-js client's changedAccessToken property still contains the user's jwt.

What is the new behavior?

this.changedAccessToken is set to undefined, per typing.

Additional context

If a TOKEN_REFRESHED or SIGNED_IN event occurs, _handleTokenChanged sets this.changedAccessToken (under the proper conditions). So I assume _handleTokenChanged is the place to unset this.changedAccessToken if a SIGNED_OUT event occurs.

Copy link
Contributor

@hf hf left a comment

Choose a reason for hiding this comment

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

Thank you @j4w8n you're awesome! 👏

@hf hf merged commit 66a58d2 into supabase:master Dec 30, 2022
mandarini pushed a commit that referenced this pull request Oct 2, 2025
mandarini added a commit that referenced this pull request Oct 2, 2025
* chore: do not fail on coveralls error

* chore: eol

---------

Co-authored-by: Bobbie Soedirgo <31685197+soedirgo@users.noreply.github.com>
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.

signOut does not clear user jwt from gotrue authorization header allowing gotrue operations and exposing user jwt

2 participants