Skip to main content

Overview

Gmail integration allows PassAgent’s reset engine to read password reset emails automatically. When you initiate a password reset, the engine monitors your inbox for the reset email, extracts the reset link or OTP code, and continues the flow without manual intervention.

Connect Gmail

1

Navigate to integrations

Go to Dashboard > Integrations and find the Gmail card.
2

Authorize

Click Connect Gmail. You’ll be redirected to Google’s consent screen.PassAgent requests these OAuth scopes:
ScopePurpose
gmail.readonlyRead emails to find reset links and OTP codes
gmail.modifyMark processed reset emails as read
3

Complete authorization

After granting permission, you’ll be redirected back to PassAgent. The integration status will show as connected.
PassAgent uses prompt: consent in the OAuth flow to always request a fresh refresh token, ensuring reliable long-term access without re-authorization.

How email monitoring works

During an active password reset flow:
  1. Trigger: the reset engine submits the password reset form on the target service
  2. Poll: PassAgent monitors your Gmail inbox using service-specific search queries (e.g., from:accounts@netflix.com subject:password reset)
  3. Extract: when the reset email arrives, the engine parses the HTML and text content to find reset links or OTP codes
  4. Follow: the extracted link is opened in the automated browser, or the OTP code is entered into the reset form
  5. Cleanup: the processed email is marked as read

Privacy controls

  • PassAgent only reads emails during active reset flows that you initiate
  • Email access is scoped to specific sender patterns and subjects defined in the service registry
  • No emails are stored, forwarded, or used for any purpose beyond the current reset
  • You can disconnect Gmail at any time from Dashboard > Integrations

Token storage

OAuth tokens are stored in your Supabase account record:
  • Tokens are encrypted at rest using server-side encryption when isTokenEncryptionEnabled() is active
  • Access tokens are refreshed automatically when expired
  • Refresh tokens persist until you disconnect the integration

Disconnect Gmail

Navigate to Dashboard > Integrations and click Disconnect on the Gmail card. This:
  1. Revokes the OAuth tokens with Google
  2. Deletes stored tokens from the database
  3. Disables email monitoring for future resets
After disconnecting, password resets will pause when they reach the “waiting for email” step and ask you to manually provide the reset link or OTP code.

Troubleshooting

IssueSolution
Reset email not detectedCheck your spam folder. The engine searches specific sender patterns — the email may use a different sender address.
Token expiredGo to Integrations and click Refresh. If that fails, disconnect and reconnect.
”Insufficient permissions” errorReconnect Gmail and ensure both scopes are granted on the consent screen.
Multiple Gmail accountsPassAgent connects one Gmail account per user. To switch accounts, disconnect and reconnect with the desired account.