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.
- In the Google Cloud console, create a project and enable the Google Calendar API.
- In Google Auth Platform, fill in Branding: the app name, the address of your Worker as
home page,
https://<your-worker>/privacyas privacy policy, and the domain of your Worker as authorized domain. We have not tested whether Google accepts aworkers.devaddress here. If it does not, give your Worker a custom domain, setPUBLIC_URLto it, and use that domain in this step and in the redirect URI. - Under Data access, add the scopes
openid,email,profile,https://www.googleapis.com/auth/calendar.eventsandhttps://www.googleapis.com/auth/calendar.calendarlist.readonly. - Under Audience, publish the app to In production.
- Under Clients, create a Web application client with the redirect URI
https://<your-worker>/auth/google/callback. - Set
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRETas secrets. In the Cloudflare dashboard, open your Worker, Settings, Variables and Secrets. With a clone, you can runpnpm 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:
- On the warning page, choose Advanced.
- Choose Go to … (unsafe), where the dots are the name of your OAuth app.
- 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.