We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a296342 + 03334b8 commit 51212f2Copy full SHA for 51212f2
lib/fcm.rb
@@ -320,11 +320,11 @@ def validate_condition_topics?(condition)
320
321
def jwt_token
322
scope = "https://www.googleapis.com/auth/firebase.messaging"
323
- authorizer = Google::Auth::ServiceAccountCredentials.make_creds(
+ @authorizer ||= Google::Auth::ServiceAccountCredentials.make_creds(
324
json_key_io: json_key,
325
scope: scope,
326
)
327
- token = authorizer.fetch_access_token!
+ token = @authorizer.fetch_access_token!
328
token["access_token"]
329
end
330
0 commit comments