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

[Feature Request] Global Sign Out #398

Closed
fdarsot opened this issue Feb 19, 2021 · 5 comments
Closed

[Feature Request] Global Sign Out #398

fdarsot opened this issue Feb 19, 2021 · 5 comments
Assignees
Labels
auth Issues related to the Auth Category feature-request A request for a new feature or an enhancement to an existing API or category.

Comments

@fdarsot
Copy link

fdarsot commented Feb 19, 2021

Firstly, great work with the package. appreciate all the work.

I was wondering can a feature be added where as soon a user Signs in via Amplify.Auth, the system logs the user out of all other active sessions? This way only a single user can be logged into a single device at a time.

Also, I noticed with the new release, the global signout option was deprecated.

@fjnoyp fjnoyp added auth Issues related to the Auth Category feature-request A request for a new feature or an enhancement to an existing API or category. labels Feb 21, 2021
@Jordan-Nelson Jordan-Nelson changed the title Remote or Global Sign Out feature [Feature Request] Global Sign Out Aug 10, 2021
@Jordan-Nelson Jordan-Nelson self-assigned this Aug 10, 2021
@Jordan-Nelson
Copy link
Member

FYI - This issue will be used to track a global sign out feature, which is currently supported in the iOS and Android libraries. #418 will be used to track single device sign on.

@Jordan-Nelson Jordan-Nelson added the pending-release Issues that have been addressed in main but have not been released label Sep 23, 2021
@Jordan-Nelson
Copy link
Member

#782 has been merged which adds global sign out. This will be included in the next release. I will update this issue once it is available.

@Jordan-Nelson
Copy link
Member

This option is available in version 0.2.5 and later. The docs update for this is still pending, so I will keep this issue open. Until then, here is a snippet showing how to use this option:

try {
  await Amplify.Auth.signOut(options: SignOutOptions(globalSignOut: true));
} on AmplifyException catch (e) {
  print(e.message);
}

@Jordan-Nelson
Copy link
Member

The docs for this are now available here.

@Jordan-Nelson Jordan-Nelson removed the pending-release Issues that have been addressed in main but have not been released label Oct 27, 2021
@miguelangelflores1993
Copy link

Esta opción está disponible en la versión 0.2.5 y posteriores. La actualización de los documentos para esto aún está pendiente, por lo que mantendré este problema abierto. Hasta entonces, aquí hay un fragmento que muestra cómo utilizar esta opción:

try {
  await Amplify.Auth.signOut(options: SignOutOptions(globalSignOut: true));
} on AmplifyException catch (e) {
  print(e.message);
}

logout from cognito console but fetchAuthSession still fetching valid tokens
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category feature-request A request for a new feature or an enhancement to an existing API or category.
Projects
None yet
Development

No branches or pull requests

4 participants