Skip to content
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: clear this.changedAccessToken after signOut #645

Merged
merged 1 commit into from Dec 30, 2022
Merged

fix: clear this.changedAccessToken after signOut #645

merged 1 commit into from Dec 30, 2022

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants