I’m building a Forge graph:connector app that ingests Google Drive files into Teamwork Graph / Rovo Search using OAuth (API Key approach works fine).
The manifest defines a Google OAuth provider:
providers:
auth:
- key: google
type: oauth2
scopes:
- profile
- https://www.googleapis.com/auth/userinfo.email
- https://www.googleapis.com/auth/drive.readonly
OAuth works from a Jira global page using api.asUser().withProvider('google', 'google-apis'): after requestCredentials(), listAccounts() returns the authorized Google account.
However, the connector lifecycle functions (validateConnection and onConnectionChange) do not seem to have access to that same OAuth account. In those functions, listAccounts() / hasCredentials() returns no usable credentials, even though the global page shows the account as authorized.
My questions:
- Is Forge external OAuth intended to be usable inside
graph:connectorlifecycle functions such asvalidateConnectionandonConnectionChange? - If yes, what is the correct way to bind the Google OAuth account/token to a specific connector connection?
- If no, is the recommended pattern for private Google Drive ingestion to use a backend credential such as a Google service account instead?
- What role does
graph:connector.auth.providerplay here? Is it only for end-user identity/permission mapping, or should it also make the provider credentials available to connector callbacks?