[PR #2023] [MERGED] [PS-1219] Crash when login with SSO #3299

Closed
opened 2025-11-26 23:30:54 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2023
Author: @aj-rosado
Created: 8/3/2022
Status: Merged
Merged: 8/16/2022
Merged by: @aj-rosado

Base: masterHead: bug/PS-1219-crash-login-sso


📝 Commits (4)

  • 3b2a8e2 PS-1219 Added null checks and improved error handling on SSO Login
  • b609b41 PS-1219 Improved code
  • 98683f7 PS-1219 Improved const naming
  • 5c2d0f9 Merge branch 'master' into bug/PS-1219-crash-login-sso

📊 Changes

2 files changed (+79 additions, -63 deletions)

View changed files

📝 src/App/Pages/Accounts/LoginSsoPage.xaml.cs (+2 -2)
📝 src/App/Pages/Accounts/LoginSsoPageViewModel.cs (+77 -61)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

In some cases users are having crashes when trying to login with SSO. Added some validations and improved the error handling on the SSO Login flow

Code changes

  • LoginSsoPageViewModel.cs Added validation to the response of _apiService.PreValidateSso, if the value in null the app will show a specific error message. Put everything on LogInAsync inside a try to ensure that any exception that occurs is caught and logged.

Screenshots

Before you submit

  • I have checked for formatting errors (dotnet tool run dotnet-format --check) (required)
  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2023 **Author:** [@aj-rosado](https://github.com/aj-rosado) **Created:** 8/3/2022 **Status:** ✅ Merged **Merged:** 8/16/2022 **Merged by:** [@aj-rosado](https://github.com/aj-rosado) **Base:** `master` ← **Head:** `bug/PS-1219-crash-login-sso` --- ### 📝 Commits (4) - [`3b2a8e2`](https://github.com/bitwarden/android/commit/3b2a8e2459540eabfd21e12197c6c2c158b10be8) PS-1219 Added null checks and improved error handling on SSO Login - [`b609b41`](https://github.com/bitwarden/android/commit/b609b41823a1dc2774511df06cbf093960bf9d1a) PS-1219 Improved code - [`98683f7`](https://github.com/bitwarden/android/commit/98683f78cf9c5b860f174609e59eeb8b7d633b76) PS-1219 Improved const naming - [`5c2d0f9`](https://github.com/bitwarden/android/commit/5c2d0f981846b9159acbce8ab7f3dba59072c8f9) Merge branch 'master' into bug/PS-1219-crash-login-sso ### 📊 Changes **2 files changed** (+79 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `src/App/Pages/Accounts/LoginSsoPage.xaml.cs` (+2 -2) 📝 `src/App/Pages/Accounts/LoginSsoPageViewModel.cs` (+77 -61) </details> ### 📄 Description ## Type of change - [x] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective In some cases users are having crashes when trying to login with SSO. Added some validations and improved the error handling on the SSO Login flow ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **LoginSsoPageViewModel.cs** Added validation to the response of `_apiService.PreValidateSso`, if the value in null the app will show a specific error message. Put everything on `LogInAsync` inside a try to ensure that any exception that occurs is caught and logged. ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ## Before you submit - [x] I have checked for formatting errors (`dotnet tool run dotnet-format --check`) (required) - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:30:54 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3299