Google OAuth¶
calsync signs users in with Google, and it uses the same grant to read the calendar list and write events.
Create the client¶
- Create a project in the Google Cloud console and enable the Google Calendar API.
- Configure the OAuth consent screen and add these scopes:
openidemailhttps://www.googleapis.com/auth/calendar.calendarlist.readonlyhttps://www.googleapis.com/auth/calendar.events
- Create an OAuth client ID of type Web application. Add
<CALSYNC_BASE_URL>/auth/callbackas an authorized redirect URI. - Put the client ID and secret into
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET.
Publish the consent screen
Set the consent screen's publishing status to In production. An unverified app is fine for personal use; Google shows a warning screen you can click through. In Testing mode, refresh tokens expire after 7 days, and background syncs stop working.