interface FcmTokenSource
Since 0.1.0

Supplies OAuth2 access tokens for FCM HTTP v1.

Implemented internally by a service-account signer. Supply your own through FcmProviderOptions.tokenSource to source tokens differently — for example from a GCP metadata server, or from a workload-identity broker that holds the private key outside the application.

Methods

getAccessToken(): Promise<string>

Returns a valid access token, minting or refreshing one as needed.

Usage

import { type FcmTokenSource } from "notification-plugin/src/index.ts";