Skip to content

Cleanup OIDC #1128

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

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Cleanup OIDC #1128

merged 2 commits into from
Aug 28, 2023

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Aug 23, 2023

Take into account comment from #1127 PR
Add a workaround to prevent user from getting stuck on a disabled "Continue" button.

(manually assigned to @jmartinesp for the follow up on #1127)

@bmarty bmarty requested a review from a team as a code owner August 23, 2023 16:13
@bmarty bmarty requested review from Florian14 and removed request for a team August 23, 2023 16:13
@github-actions
Copy link
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/xzWCxB

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Patch coverage: 66.66% and no project coverage change.

Comparison is base (14c568d) 57.10% compared to head (26e5da9) 57.10%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1128   +/-   ##
========================================
  Coverage    57.10%   57.10%           
========================================
  Files         1023     1023           
  Lines        26243    26243           
  Branches      5309     5309           
========================================
  Hits         14987    14987           
  Misses        8946     8946           
  Partials      2310     2310           
Files Changed Coverage Δ
...tures/preferences/impl/root/PreferencesRootView.kt 61.76% <ø> (ø)
...ement/android/libraries/matrix/api/MatrixClient.kt 100.00% <ø> (ø)
...roid/features/logout/api/LogoutPreferenceScreen.kt 22.22% <33.33%> (+2.22%) ⬆️
...accountprovider/ConfirmAccountProviderPresenter.kt 87.93% <100.00%> (-0.21%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty requested review from jmartinesp and removed request for Florian14 August 24, 2023 07:05
// consider that the user has cancelled the login
// by pressing back or by closing the Custom Chrome Tab.
lifecycleScope.launch {
delay(5000)
Copy link
Member

Choose a reason for hiding this comment

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

Why the 5s delay here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is sort of a compromise... If we wait more, the user will see a disabled button for a longer time.
If we wait less, we take the risk to cancel the login operation (the request to the homeserver with the Oidc token) before it finishes. The request does not take a long time, so maybe 2s is enough, but I did not want to take the risk.

The solution is not ideal, maybe we could try to detect that no OidcAction has been triggered (this should happen quite faster) and if this is the case we can cancel faster. I will think again about it.

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bmarty bmarty merged commit 5d889af into develop Aug 28, 2023
@bmarty bmarty deleted the feature/bma/cleanupOidc branch August 28, 2023 13:08
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.

2 participants