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

feat: add signOut() scope option #713

Merged
merged 1 commit into from
Jul 3, 2023
Merged

feat: add signOut() scope option #713

merged 1 commit into from
Jul 3, 2023

Conversation

hf
Copy link
Contributor

@hf hf commented Jun 28, 2023

Adds the scope option to the signOut method which can be used to control which sessions should be signed out of the account.

See:

@j4w8n
Copy link
Contributor

j4w8n commented Jun 28, 2023

Excellent.

Was there any discussion about the behavior verbiage? I ask because it seems like scope would be a good fit here.

Copy link
Contributor

@J0 J0 left a comment

Choose a reason for hiding this comment

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

LGTM, may want to consider the naming suggestion - another minor reason but no to prefer scope over behaviour is that there's only one spelling of it between UK and US English. In either case, the functionality seems fine to me though so will leave the naming up to you

@kangmingtay
Copy link
Member

lets go with scope

hf added a commit to supabase/auth that referenced this pull request Jul 3, 2023
Right now, probably due to a bug, `POST /logout` would log the user out
from _all_ sessions they have. This is not always desired behavior.

This change adds a new `scope` query param on `/logout` with these
values:
- `global` (default when not provided) Logs a user out from all sessions
they have.
- `local` Logs a user out from the current session only.
- `others` Logs a user out from all other sessions except the current
one.

See:
- supabase/auth-js#713
@hf hf force-pushed the hf/add-logout-behavior branch from d5c1ba5 to 3619096 Compare July 3, 2023 07:58
@hf hf changed the title feat: add signOut() behavior option feat: add signOut() scope option Jul 3, 2023
@hf
Copy link
Contributor Author

hf commented Jul 3, 2023

Changed the name.

@hf hf merged commit 0f04bfc into master Jul 3, 2023
1 check passed
@hf hf deleted the hf/add-logout-behavior branch July 3, 2023 08:00
@github-actions
Copy link
Contributor

github-actions bot commented Jul 3, 2023

🎉 This PR is included in version 2.39.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants