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

SDK - Logout all devices #6207

Merged
merged 12 commits into from
Jun 27, 2022
Merged

Conversation

ouchadam
Copy link
Contributor

@ouchadam ouchadam commented May 31, 2022

Draft as this depends on #6171

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

#6191 Adding SDK support for MSC2457 - opting in/out of logging out of all devices when changing password

  • Updates the database version and provides a migration for the new HomeserverCapabilities.canControlLogoutDevices field

Motivation and context

To enable the next steps of the FTUE forgotten password flow to introduce a new sign out all devices check box.

Screenshots / GIFs

no UI changes here, is made use of in #6263

Tests

No logic changes

Tested devices

  • Physical
  • Emulator
  • OS version(s):

@ouchadam ouchadam added Z-FTUE Issue is relevant to the first time use project or experience matrix-sdk labels May 31, 2022
@github-actions
Copy link

github-actions bot commented May 31, 2022

Unit Test Results

124 files   - 18  124 suites   - 18   2m 19s ⏱️ +6s
222 tests  -   9  222 ✔️  -   9  0 💤 ±0  0 ±0 
734 runs   - 34  734 ✔️  - 34  0 💤 ±0  0 ±0 

Results for commit e2abbc9. ± Comparison against base commit 3ae103c.

♻️ This comment has been updated with latest results.

@ouchadam ouchadam force-pushed the feature/adm/sdk-new-password-on-confirmation branch 2 times, most recently from 2f51280 to edfabb0 Compare June 6, 2022 12:59
Base automatically changed from feature/adm/sdk-new-password-on-confirmation to develop June 7, 2022 15:43
@ouchadam ouchadam force-pushed the feature/adm/sdk-signout-all-devices branch from e2abbc9 to 3c3bd77 Compare June 8, 2022 11:04
@ouchadam ouchadam marked this pull request as ready for review June 8, 2022 11:04
@ouchadam ouchadam requested review from a team, Florian14 and fedrunov and removed request for a team June 8, 2022 11:06
Copy link
Contributor

@Florian14 Florian14 left a comment

Choose a reason for hiding this comment

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

LGTM

@fedrunov
Copy link
Contributor

Just to understand - when we logout user from all sessions we do that only server-side? There is no event coming from server to clients, which we need to handle? Like push notification to let user know that they was logged out and won't receive notifications anymore?

@ouchadam
Copy link
Contributor Author

Just to understand - when we logout user from all sessions we do that only server-side? There is no event coming from server to clients, which we need to handle? Like push notification to let user know that they was logged out and won't receive notifications anymore?

Correct, it's server controlled, there's no real-time push event but the users token is invalidated and they'll receive a 401 the next time they attempt to make a request with their locally stored token (which the clients already handle)

for context, logging out from all sessions is the current default behaviour for Android, the change in this PR enables the SDK to opt out

@ouchadam ouchadam force-pushed the feature/adm/sdk-signout-all-devices branch from 7a633a4 to e655a54 Compare June 24, 2022 14:10
@sonarcloud
Copy link

sonarcloud bot commented Jun 24, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

43.8% 43.8% Coverage
0.0% 0.0% Duplication

@ouchadam ouchadam merged commit ccb4f2d into develop Jun 27, 2022
@ouchadam ouchadam deleted the feature/adm/sdk-signout-all-devices branch June 27, 2022 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
matrix-sdk Z-FTUE Issue is relevant to the first time use project or experience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants