Skip to content

Handle forbidden auth check with token user ID#1159

Open
davidrimshnick wants to merge 1 commit into
bachya:devfrom
davidrimshnick:agent/handle-authcheck-403
Open

Handle forbidden auth check with token user ID#1159
davidrimshnick wants to merge 1 commit into
bachya:devfrom
davidrimshnick:agent/handle-authcheck-403

Conversation

@davidrimshnick

Copy link
Copy Markdown

Describe what the PR does:

SimpliSafe can return 403 Forbidden from api/authCheck even after successfully issuing a valid access token. When that specific response occurs, decode the http://simplisafe.com/uid claim from the newly issued access token and use it as the account user ID.

All other HTTP failures continue to propagate unchanged, and a 403 still propagates when the token is malformed or does not contain a usable user ID.

Does this fix a specific issue?

Related to home-assistant/core#149151

Checklist:

  • Confirm that one or more new tests are written for the new functionality.
  • Run tests and ensure everything passes (with 100% test coverage).
  • README update is not needed because this changes no public API.

Testing:

  • pytest --cov simplipy tests: 97 passed, 100% coverage
  • Ruff formatting and lint: passed
  • isort: passed
  • mypy: passed

@davidrimshnick
davidrimshnick marked this pull request as ready for review July 18, 2026 23:46
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.

1 participant