Skip to content

Class

GooglePlayJWTGenerator

Generates and caches Google OAuth2 access tokens for service account authentication.

actor GooglePlayJWTGenerator

Overview

Uses RS256 JWT signing to authenticate with https://oauth2.googleapis.com/token, mirroring the pattern of JWTGenerator in the App Store Connect client.

Usage

let generator = GooglePlayJWTGenerator(credentials: credentials)
let token = try await generator.cachedOrNewToken()

// Firebase App Distribution needs a different scope:
let firebase = GooglePlayJWTGenerator(credentials: credentials, scope: .cloudPlatform)

Topics

Structures

  • struct Scope

    An OAuth2 scope requested when exchanging the signed JWT for an access token.

Initializers

Instance Methods

Default Implementations

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype
  • _Concurrency.Actor