Cloud Firestore API - Class Google::Cloud::Firestore::Credentials (v2.10.1)

Reference documentation and code samples for the Cloud Firestore API class Google::Cloud::Firestore::Credentials.

Credentials

Represents the authentication and authorization used to connect to the Firestore service.

Inherits

  • Google::Cloud::Firestore::V1::Firestore::Credentials

Example

require "google/cloud/firestore"

keyfile = "/path/to/keyfile.json"
creds = Google::Cloud::Firestore::Credentials.new keyfile

firestore = Google::Cloud::Firestore.new(
  project_id: "my-project",
  credentials: creds
)

firestore.project_id #=> "my-project"