oncall-engine/grafana-plugin
Joey Orlando eb777f5415
address Google OAuth2 issues where user didn't grant us the https://www.googleapis.com/auth/calendar.events.readonly scope (#4802)
# What this PR does

Follow up PR to https://github.com/grafana/oncall/pull/4792

Basically if when communicating with Google Calendar's API we encounter
an HTTP 403, or the Google client throws a
`google.auth.exceptions.RefreshError` this means one of three things:
1. the refresh token we have persisted for the user is missing the
`https://www.googleapis.com/auth/calendar.events.readonly` scope (HTTP
403)
2. the Google user has been deleted
(`google.auth.exceptions.RefreshError`)
3. the refresh token has expired (`google.auth.exceptions.RefreshError`)

To prevent scenario 1 above from happening in the future we now will
check that the token has been granted the required scopes. If the user
doesn't grant us all the necessary scopes, we will show them an error
message in the UI:
https://www.loom.com/share/0055ef03192b4154b894c2221cecbd5f

For tokens that were granted prior to this PR and which are missing the
required scope, we will show the user a dismissible warning banner in
the UI letting them know that they will need to reconnect their account
and grant us the missing permissions (see [this second demo
video](https://www.loom.com/share/bf2ee8b840864a64893165370a892bcd)
showing this).

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
    show up in the autogenerated release notes.

---------

Co-authored-by: Dominik <dominik.broj@grafana.com>
2024-08-14 18:02:34 -04:00
..
.config Migrate react-router to v6 (#4703) 2024-07-26 10:36:20 +00:00
e2e-tests Fix e2e test (#4786) 2024-08-07 12:08:12 +00:00
src address Google OAuth2 issues where user didn't grant us the https://www.googleapis.com/auth/calendar.events.readonly scope (#4802) 2024-08-14 18:02:34 -04:00
tools Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
.dockerignore move ms teams related models, containers, components etc to oncall (#3594) 2024-01-08 10:50:19 +00:00
.eslintignore generate types, create http client and add exemplary usage (#3384) 2023-11-29 05:16:13 +00:00
.eslintrc.js Feature: Use ui extension hooks where available (#4765) 2024-08-13 10:18:20 +00:00
.gitignore Fix frontend unit tests (#4045) 2024-03-12 12:21:53 +00:00
.nvmrc Chore: update the .nvmrc (#4766) 2024-07-31 13:59:16 +00:00
.prettierrc.js Migrate from grafana-toolkit to grafana plugin tools (#3837) 2024-02-21 07:49:10 -07:00
.stylelintrc add selector-max-type stylelint rule 2022-11-02 11:44:42 +00:00
Dockerfile.dev bump nodejs version to latest stable (#4678) 2024-07-16 11:16:23 +00:00
jest.config.js fix tests and types generator (#4746) 2024-07-26 15:59:55 +00:00
jest.setup.ts Cleanup error logs on frontend unit test run (#4167) 2024-04-17 11:05:11 +00:00
knip.json Configure knip and remove dead code (#3999) 2024-03-06 08:06:03 +00:00
LICENSE World, meet OnCall! 2022-06-03 08:09:47 -06:00
package.json Bump axios from 1.6.7 to 1.7.4 in /grafana-plugin (#4816) 2024-08-14 12:59:33 +00:00
playwright.config.ts Configure cross plugin e2e tests (#4222) 2024-04-25 06:25:59 +00:00
plopfile.js Merge dev to main (#54) 2022-06-13 16:39:58 -06:00
README.md move some grafana-plugin/README contents (#3525) 2023-12-08 10:30:01 -05:00
tsconfig.json Migrate from grafana-toolkit to grafana plugin tools (#3837) 2024-02-21 07:49:10 -07:00
webpack.config.ts allow plugin id customization (for IRM monorepo) (#4751) 2024-07-30 05:50:41 +00:00
yarn.lock Bump axios from 1.6.7 to 1.7.4 in /grafana-plugin (#4816) 2024-08-14 12:59:33 +00:00

Grafana OnCall

Developer-Friendly Alert Management with Brilliant Slack Integration

  • Connect monitoring systems
  • Collect and analyze data
  • On-call rotation
  • Automatic escalation
  • Never miss alerts with calls and SMS

Documentation