AbstractStaticMergeMerge scopes from multiple tools, deduplicating.
Arrays of scopes to merge
Deduplicated array of scopes
AbstractgetRetrieves an access token for a syncable resource.
Returns the token of the user who enabled sync on the given syncable. If the syncable is not enabled or the token is expired/invalid, returns null.
The OAuth provider
The syncable resource ID (e.g., calendar ID)
Promise resolving to the access token or null
AbstractactExecute a callback as a specific actor, requesting auth if needed.
If the actor has a valid token, calls the callback immediately with it. If the actor has no token, creates a private auth note in the specified activity prompting them to connect. Once they authorize, this callback fires.
The OAuth provider
The actor to act as
The activity to create an auth note in (if needed)
Function to call with the token
Additional arguments to pass to the callback
Built-in tool for managing OAuth authentication and syncable resources.
The redesigned Integrations tool:
Auth and syncable management is handled in the twist edit modal in Flutter, removing the need for tools to create auth activities or selection UIs.
Example