Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[docs] Display FCM V1 instructions (#27516)
# Why We are readying the ability to upload FCM V1 credentials to our website. Along with that change, we need to update the docs. # How This PR: - Adds a /push-notifications/fcm-credentials page - Updates the credentials part of the setup page (at /push-notifications/push-notifications-setup) - Updates other parts of our docs that previously referenced FCM legacy credentials # Screenshots ## /push-notifications/fcm-credentials ![Add Google Service Account Keys using FCM V1 - Expo Documentation](https://github.com/expo/expo/assets/6455018/20822a5b-ff88-49d8-b399-a899eb93fe2f) ## /push-notifications/push-notifications-setup ![Capture-2024-03-07-225633](https://github.com/expo/expo/assets/6455018/3f378819-fd3e-4ca9-a729-052433d7bd60) # Test Plan Read through the docs and make sure they're accurate, and properly explain how to upload and use FCM V1 credentials. # Deployment This PR should not be merged until we allow the ability to upload FCM V1 credentials on expo.dev. --------- Co-authored-by: Aman Mittal <amandeepmittal@live.com>
- Loading branch information
1 parent
0a5a068
commit 7616c4a
Showing
22 changed files
with
198 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
--- | ||
title: Add Google Service Account Keys using FCM V1 | ||
sidebar_title: Add Android FCM V1 credentials | ||
description: Learn how to create or use a Google Service Account Key for sending Android Notifications using FCM V1. | ||
--- | ||
|
||
import { Step } from '~/ui/components/Step'; | ||
import ImageSpotlight from '~/components/plugins/ImageSpotlight'; | ||
import { Tab, Tabs } from '~/ui/components/Tabs'; | ||
|
||
## Create a new Google Service Account Key | ||
|
||
Here are the steps to configure a new Google Service Account Key in EAS for sending Android Notifications using FCM V1. | ||
|
||
<Step label="1"> | ||
Create a new Firebase project for your app in the [Firebase Console](https://console.firebase.google.com). If you already have a Firebase project for your app, continue to the next step. | ||
|
||
<ImageSpotlight | ||
alt="Create a project in the Firebase Console" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/01-new-firebase-project.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> | ||
|
||
<Step label="2"> | ||
In the Firebase console, open **Project settings** > [**Service accounts**](https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk) for your project. | ||
|
||
<ImageSpotlight | ||
alt="Service accounts settings tab in Firebase console" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/02-manage-service-accounts.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> | ||
|
||
<Step label="3"> | ||
Click **Generate New Private Key**, then confirm by clicking **Generate Key**. Securely store the JSON file containing the private key. | ||
|
||
<ImageSpotlight | ||
alt="Generate a new private key in the Firebase Console" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/03-generate-key.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> | ||
|
||
<Step label="4"> | ||
Upload the JSON file to EAS and configure it for sending Android notifications. This can be done using EAS CLI or in [Expo dashboard](https://expo.dev). | ||
|
||
<Tabs tabs={["EAS CLI", "expo.dev"]}> | ||
<Tab> | ||
- Run `eas credentials` | ||
- Select `Android` > `production` > `Google Service Account` | ||
- Select `Manage your Google Service Account Key for Push Notifications (FCM V1)` | ||
</Tab> | ||
<Tab> | ||
- Under **Project settings**, click [Credentials](https://expo.dev/accounts/[account]/projects/[project]/credentials) in the navigation menu | ||
- For **Android**, click **Add Application Identifier** or select an existing **Application identifier** | ||
- Under **Service Credentials**, find **FCM V1 service account key** | ||
|
||
<ImageSpotlight | ||
alt="Project credentials page on expo.dev" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/04-upload-credential-1.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
- Click **Add a service account key** | ||
- Under **Upload new key**, upload your JSON credential and click **Save** | ||
|
||
<ImageSpotlight | ||
alt="Select service account key file to upload" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/04-upload-credential-2.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
<ImageSpotlight | ||
alt="Save the service account key file to the project" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/04-upload-credential-3.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Tab> | ||
</Tabs> | ||
</Step> | ||
|
||
<Step label="5"> | ||
You're all set! You can now send notifications to Android devices via Expo Push Notifications using the FCM V1 protocol. | ||
|
||
<ImageSpotlight | ||
alt="Service account key successfully uploaded" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/05-upload-credential-complete.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> | ||
|
||
## Use an existing Google Service Account Key | ||
|
||
<Step label="1"> | ||
Open the [IAM Admin page](https://console.cloud.google.com/iam-admin/iam?authuser=0) in Google Cloud Console. In the Permissions tab, locate the **Principal** you intend to modify and click the pencil icon for **Edit Principal**. | ||
|
||
<ImageSpotlight | ||
alt="Edit Principal in IAM Admin page in Google Cloud Console" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/01-iam-admin-page.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> | ||
|
||
<Step label="2"> | ||
Click **Add Role** and select the **Firebase Messaging API Admin** role from the dropdown. Click **Save**. | ||
|
||
<ImageSpotlight | ||
alt="Assign roles" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/02-add-role-1.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
<ImageSpotlight | ||
alt="Select the Firebase Messaging API Admin role" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/02-add-role-2.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
<ImageSpotlight | ||
alt="Save the role assignment" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/02-add-role-3.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> | ||
|
||
<Step label="3"> | ||
You have to specify to EAS which JSON credential file to use for sending FCM V1 notifications, using EAS CLI or in [Expo dashboard](https://expo.dev). You can upload a new JSON file or select a previously uploaded file. | ||
|
||
<Tabs tabs={["EAS CLI", "expo.dev"]}> | ||
<Tab> | ||
- Run `eas credentials` | ||
- Select `Android` > `production` > `Google Service Account` | ||
- Select `Manage your Google Service Account Key for Push Notifications (FCM V1)` | ||
</Tab> | ||
<Tab> | ||
- Under **Project settings**, click [Credentials](https://expo.dev/accounts/[account]/projects/[project]/credentials) in the navigation menu | ||
- For **Android**, click **Add Application Identifier** or select an existing **Application identifier** | ||
- Under **Service Credentials**, find **FCM V1 service account key** | ||
|
||
<ImageSpotlight | ||
alt="Project credentials page on expo.dev" | ||
src="/static/images/creating-google-service-account/fcm-v1/new-service-account/04-upload-credential-1.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
- Click **Add a service account key** | ||
- Upload your JSON credential and click **Save** | ||
|
||
<ImageSpotlight | ||
alt="Select service account key file to upload" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/03-upload-credential-2.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
<ImageSpotlight | ||
alt="Save the service account key file to the project" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/03-upload-credential-3.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Tab> | ||
</Tabs> | ||
</Step> | ||
|
||
<Step label="4"> | ||
You're all set! You can now send notifications to Android devices via Expo Push Notifications using the FCM V1 protocol. | ||
|
||
<ImageSpotlight | ||
alt="Service account key successfully uploaded" | ||
src="/static/images/creating-google-service-account/fcm-v1/existing-service-account/04-upload-credential-complete.png" | ||
style={{ maxWidth: 800 }} | ||
/> | ||
</Step> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+134 KB
...ng-google-service-account/fcm-v1/existing-service-account/01-iam-admin-page.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+151 KB
...eating-google-service-account/fcm-v1/existing-service-account/02-add-role-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+133 KB
...eating-google-service-account/fcm-v1/existing-service-account/02-add-role-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+131 KB
...eating-google-service-account/fcm-v1/existing-service-account/02-add-role-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.1 KB
...ogle-service-account/fcm-v1/existing-service-account/03-upload-credential-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.9 KB
...ogle-service-account/fcm-v1/existing-service-account/03-upload-credential-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.4 KB
...ogle-service-account/fcm-v1/existing-service-account/03-upload-credential-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+103 KB
...rvice-account/fcm-v1/existing-service-account/04-upload-credential-complete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+93.4 KB
...g-google-service-account/fcm-v1/new-service-account/01-new-firebase-project.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+108 KB
...oogle-service-account/fcm-v1/new-service-account/02-manage-service-accounts.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+104 KB
.../creating-google-service-account/fcm-v1/new-service-account/03-generate-key.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+87.4 KB
...ng-google-service-account/fcm-v1/new-service-account/04-upload-credential-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+95 KB
...ng-google-service-account/fcm-v1/new-service-account/04-upload-credential-2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.4 KB
...ng-google-service-account/fcm-v1/new-service-account/04-upload-credential-3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+99.2 KB
...le-service-account/fcm-v1/new-service-account/05-upload-credential-complete.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Submodule expo-server-sdk-rust
added at
a4334d