Skip to content

feat(integrations): report google authorization status - #59

Merged
IamMuuo merged 1 commit into
stagingfrom
feat/google-authorization-status
Jul 27, 2026
Merged

feat(integrations): report google authorization status#59
IamMuuo merged 1 commit into
stagingfrom
feat/google-authorization-status

Conversation

@IamMuuo

@IamMuuo IamMuuo commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Add POST /integrations/google/status/, which answers whether the caller has granted the Google calendar and tasks capabilities. Not having granted them is a normal answer rather than a failure, so the check returns 200 either way and clients branch on the body.

When capabilities are missing the response relays Verisafe's authorization instruction verbatim. The client makes that call itself, supplying its own platform, redirect_uri, and bearer token: starting a consent flow needs the user's token, which this service deliberately does not hold. The url handed back is Verisafe's authorize endpoint, not the Google consent screen.

Check grants rather than requesting a token, so no Google credential is minted to answer a yes/no question. The token call happens only when something is missing, where it is expected to be refused, and the refusal is what carries the authoritative url and method.

Report a rejected service token as 502 rather than 403. A 403 would tell the client that the user must re-authorize, sending them through a consent flow to fix a misconfiguration that was never theirs.

Queue a pull when everything is granted, so a user who has just finished authorizing sees their tasks without waiting for the next scheduled sync.

Add POST /integrations/google/status/, which answers whether the caller
has granted the Google calendar and tasks capabilities. Not having
granted them is a normal answer rather than a failure, so the check
returns 200 either way and clients branch on the body.

When capabilities are missing the response relays Verisafe's
authorization instruction verbatim. The client makes that call itself,
supplying its own platform, redirect_uri, and bearer token: starting a
consent flow needs the user's token, which this service deliberately
does not hold. The url handed back is Verisafe's authorize endpoint,
not the Google consent screen.

Check grants rather than requesting a token, so no Google credential is
minted to answer a yes/no question. The token call happens only when
something is missing, where it is expected to be refused, and the
refusal is what carries the authoritative url and method.

Report a rejected service token as 502 rather than 403. A 403 would
tell the client that the user must re-authorize, sending them through a
consent flow to fix a misconfiguration that was never theirs.

Queue a pull when everything is granted, so a user who has just
finished authorizing sees their tasks without waiting for the next
scheduled sync.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bd04637-d4da-444d-8f27-7e0cd457ffd7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/google-authorization-status

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@IamMuuo
IamMuuo merged commit 386dac2 into staging Jul 27, 2026
3 checks passed
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