Skip to content

Latest commit

 

History

History
46 lines (34 loc) · 2.21 KB

File metadata and controls

46 lines (34 loc) · 2.21 KB

Google Cloud Setup

InboxSwipe uses the Gmail API with a restricted scope (gmail.modify). Google requires expensive annual security audits for public apps using this scope — so instead, every self-hoster creates their own free Google Cloud project in "Testing" mode. Takes ~15 minutes, costs nothing, and your email never touches anyone else's infrastructure.

Steps

  1. Go to console.cloud.google.com and create a new project (any name).

  2. APIs & Services → Library → search "Gmail API" → Enable.

  3. APIs & Services → OAuth consent screen:

    • User type: External → Create
    • Fill in app name and your email for both contact fields; skip logo and domains
    • Skip the Scopes page — the app requests scopes at login
    • Test users: add your own Gmail address (required — login fails without this)
    • Confirm publishing status shows Testing

    Google occasionally reorganizes this console area (you may see "Google Auth Platform" instead) — the settings are the same under slightly different navigation.

  4. APIs & Services → Credentials → Create Credentials → OAuth client ID:

    • Application type: Web application
    • Authorized redirect URI: http://localhost:3000/oauth/callback (exactly)
  5. Copy the Client ID and Client Secret into your .env file.

Known limitations of Testing mode

  • Refresh tokens expire every 7 days. You'll re-do the Google login weekly (two clicks — your Google session persists).
    • The app shows a Reconnect banner when this happens — reconnecting takes two clicks.
  • The login shows a "Google hasn't verified this app" warning. This is expected — it's your app. Click Advanced → Go to (your app name).
  • Max 100 test users, which doesn't matter for personal use.

Troubleshooting

Error Fix
redirect_uri_mismatch Redirect URI in Google Console must be exactly http://localhost:3000/oauth/callback
access_denied Your Gmail isn't added as a test user on the consent screen
No refresh token returned Remove the app at myaccount.google.com/permissions and log in again