Open Vardominator opened 1 year ago
When using the GCP Pub/Sub sink, Oura is crashing due to an access token expiration:
thread '<unnamed>' panicked at 'writer loop failed: PubSub { code: 401, message: "{\n \"error\": {\n \"code\": 401,\n \"message\": \"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.\",\n \"status\": \"UNAUTHENTICATED\",\n \"details\": [\n {\n \"@type\": \"type.googleapis.com/google.rpc.ErrorInfo\",\n \"reason\": \"ACCESS_TOKEN_EXPIRED\",\n \"domain\": \"googleapis.com\",\n \"metadata\": {\n \"method\": \"google.pubsub.v1.Publisher.Publish\",\n \"service\": \"pubsub.googleapis.com\"\n }\n }\n ]\n }\n}\n", status: "Error occurred attempting to subscribe" }', src/sinks/gcp_pubsub/setup.rs:44:14 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Is it possible to automatically refresh the access token without having to restart Oura?
@Vardominator FYI, latest version of the google pubsub lib seems to have implemented automatic token refresh. The lib has some breaking change, I'll work on applying them on Oura's side.
When using the GCP Pub/Sub sink, Oura is crashing due to an access token expiration:
Is it possible to automatically refresh the access token without having to restart Oura?