Zum Inhalt springen

Google OAuth client for calendar sync

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

slotmirror needs an OAuth client in Google Cloud to connect Google accounts.

  1. In the Google Cloud console, create a project and enable the Google Calendar API.
  2. In Google Auth Platform, fill in Branding: the app name, the address of your Worker as home page, https://<your-worker>/privacy as privacy policy, and the domain of your Worker as authorized domain. We have not tested whether Google accepts a workers.dev address here. If it does not, give your Worker a custom domain, set PUBLIC_URL to it, and use that domain in this step and in the redirect URI.
  3. Under Data access, add the scopes openid, email, profile, https://www.googleapis.com/auth/calendar.events and https://www.googleapis.com/auth/calendar.calendarlist.readonly.
  4. Under Audience, publish the app to In production.
  5. Under Clients, create a Web application client with the redirect URI https://<your-worker>/auth/google/callback.
  6. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET as secrets. In the Cloudflare dashboard, open your Worker, Settings, Variables and Secrets. With a clone, you can run pnpm wrangler secret put <NAME> instead.

Until Google verifies the app, users see a warning that the app is not verified. slotmirror tells people about it before they click “Sign in with Google” or “Connect Google”. To continue:

  1. On the warning page, choose Advanced.
  2. Choose Go to … (unsafe), where the dots are the name of your OAuth app.
  3. Approve the calendar access.

This is the normal path for your own deployment. It does not replace verification, and it does not change the 7-day expiry of an app in Testing mode.