diff --git a/lib/googleauth/user_authorizer.rb b/lib/googleauth/user_authorizer.rb index feb9b50..d99ae53 100644 --- a/lib/googleauth/user_authorizer.rb +++ b/lib/googleauth/user_authorizer.rb @@ -156,7 +156,7 @@ def get_credentials user_id, scope = nil scope: data["scope"] || @scope, access_token: data["access_token"], refresh_token: data["refresh_token"], - expires_at: data.fetch("expiration_time_millis", 0) / 1000 + expires_at: (data.fetch("expiration_time_millis") || 0) / 1000 ) scope ||= @scope return monitor_credentials user_id, credentials if credentials.includes_scope? scope