[PR #2156] [MERGED] SG-786 - Fix 400 error code log outs without invalid_grant #3393

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2156
Author: @LRNcardozoWDF
Created: 10/28/2022
Status: Merged
Merged: 10/31/2022
Merged by: @trmartin4

Base: masterHead: bug/SG-786-fix-wrongly-logouts


📝 Commits (2)

  • 7d0812d SG-786 - Added validation to check if the 400 error is invalid grant
  • 5a6a961 SG 786 - Improved code quality

📊 Changes

1 file changed (+11 additions, -2 deletions)

View changed files

📝 src/Core/Services/ApiService.cs (+11 -2)

📄 Description

Type of change

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

Objective

Be more precise to force log out when receiving 400 error code by ensuring that the response error is invalid grant.

Code changes

This is related to the clients PR 400s only log out on invalid grant error #3924

  • ApiService.cs: After parsing the json, log out the user if the response error is "invalid_grant".

Screenshots

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If 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/2156 **Author:** [@LRNcardozoWDF](https://github.com/LRNcardozoWDF) **Created:** 10/28/2022 **Status:** ✅ Merged **Merged:** 10/31/2022 **Merged by:** [@trmartin4](https://github.com/trmartin4) **Base:** `master` ← **Head:** `bug/SG-786-fix-wrongly-logouts` --- ### 📝 Commits (2) - [`7d0812d`](https://github.com/bitwarden/android/commit/7d0812d36807025180d5d23f840f7678b946f353) SG-786 - Added validation to check if the 400 error is invalid grant - [`5a6a961`](https://github.com/bitwarden/android/commit/5a6a961d8d79735cb4dc8e1c684169f50db32ca4) SG 786 - Improved code quality ### 📊 Changes **1 file changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Services/ApiService.cs` (+11 -2) </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 <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Be more precise to force log out when receiving 400 error code by ensuring that the response error is invalid grant. ## 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--> This is related to the clients PR [400s only log out on invalid grant error #3924](https://github.com/bitwarden/clients/pull/3924) * **ApiService.cs:** After parsing the json, log out the user if the response error is "invalid_grant". ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If 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:32:08 -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#3393