Fix wrong key passed for creating FCM provider

This commit is contained in:
Jake Barnby
2024-01-24 15:46:59 +13:00
parent e3664b8d55
commit 9877ecaed2
6 changed files with 9 additions and 9 deletions
@@ -180,7 +180,7 @@
providerId: providerId,
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
serverKey: $providerParams[$provider].serverKey
serviceAccountJSON: $providerParams[$provider].serviceAccountJSON
}
);
break;
@@ -101,7 +101,7 @@
providerId: $provider.$id,
name: $provider.name,
enabled: $provider.enabled,
serverKey: $provider.credentials['serverKey']
serviceAccountJSON: $provider.credentials['serviceAccountJSON']
};
break;
case Providers.APNS:
@@ -49,13 +49,13 @@ export const providers: ProvidersMap = {
description: 'Firebase Cloud Messaging',
configure: [
{
label: 'Server key (.json file)',
name: 'serverKey',
label: 'Service account JSON (.json file)',
name: 'serviceAccountJSON',
type: 'file',
allowedFileExtensions: ['json'],
placeholder: 'Enter server key',
placeholder: 'Enter service account JSON',
popover: [
'<b>How to get the FCM server key?</b>',
'<b>How to get the FCM service account JSON?</b>',
'Head to <b>Project settings -> Service accounts -> Generate new private key.</b>',
'Generating the new key will result in the download of a JSON file.'
]
@@ -180,7 +180,7 @@
providerId: providerId,
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
serverKey: $providerParams[$provider].serverKey
serviceAccountJSON: $providerParams[$provider].serviceAccountJSON
}
);
break;
@@ -90,7 +90,7 @@
providerId: id,
name: name,
enabled: true,
serverKey: ''
serviceAccountJSON: ''
};
break;
case Providers.APNS:
@@ -63,7 +63,7 @@ export type SendgridProviderParams = ProviderParams & {
*/
export type FCMProviderParams = ProviderParams & {
serverKey: string;
serviceAccountJSON: string;
};
export type APNSProviderParams = ProviderParams & {