You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development/local-dev-setup.md
+34-3Lines changed: 34 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,9 +54,9 @@ You need your own Firebase project so that your local app can communicate with t
54
54
#### Create a new Firebase project
55
55
56
56
1. Open the [Firebase Console](https://console.firebase.google.com)
57
-
1. Click on "+ Add project"
57
+
1. Click on "Create a new Firebase project"
58
58
1. Give it a relevant project name, such as "Opal Local"
59
-
1. Uncheck "Enable Google Analytics for this project"
59
+
1. Uncheck "Enable Google Analytics for this project" and other options that are proposed to you
60
60
1. Click "Create project"
61
61
62
62
The "Authentication" and "Realtime Database" features are needed for communication between the apps and backend components.
@@ -89,15 +89,46 @@ See also the Firebase documentation on [Firebase Authentication](https://firebas
89
89
90
90
#### Retrieve the Firebase project configurations
91
91
92
-
Retrieve the client configuration:
92
+
Retrieve the client configuration for browser and Android apps:
93
+
94
+
##### Browser client configuration
93
95
94
96
1. Click on the settings icon (gear) next to "Project Overview"
97
+
95
98
1. Click on "Project Settings"
99
+
96
100
1. In the "General" tab, under "Your Apps", click the "\</>" icon
101
+
97
102
1. Choose an app nickname, such as "Opal Local"
103
+
104
+
You can also enable "Firebase Hosting" at this time if you are planning to use this project for production or intend to test the password reset feature in the app.
105
+
98
106
1. Click "Register app"
107
+
99
108
1. Copy the code and save it somewhere for later
100
109
110
+
##### Mobile app client configuration
111
+
112
+
1. Go back to the "Project Settings" page
113
+
1. In the "General" tab, under "Your Apps", click the Android icon
114
+
1. Choose an Android package name
115
+
1. Click "Register app"
116
+
1. Download the `google-services.json` file and save it somewhere for later
117
+
118
+
!!! question "Do I also need to add an iOS app?"
119
+
120
+
You do not need to add it if you are only building the iOS app.
121
+
The iOS app is reusing the `google-services.json` file during the build.
122
+
123
+
However, if you intend to use [Firebase App Distribution](https://firebase.google.com/docs/app-distribution) to distribute your mobile app to testers, you will need to register an iOS app as well.
124
+
125
+
1. Go back to the "Project Settings" page
126
+
1. In the "General" tab, under "Your Apps", click the iOS icon
127
+
1. Provide the Apple bundle ID of your app
128
+
1. Click "Register app"
129
+
130
+
##### Service account
131
+
101
132
Retrieve the private key for the admin SDK:
102
133
103
134
1. Go back to the "Project Settings" page and click on the "Service accounts" tab
Copy file name to clipboardExpand all lines: docs/install/index.md
+145Lines changed: 145 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,90 @@ The database server can also be run on a separate server:
39
39
40
40
Relationships between components on the same host are left out for brevity (except those making use of third-party components).
41
41
42
+
### Requirements
43
+
44
+
You need at least one machine on which to deploy the Opal PIE.
45
+
This machine needs to have the [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed.
46
+
A compatible container engine that also has support for compose can also be used.
47
+
48
+
In addition, you need a Firebase project.
49
+
50
+
#### Create and set up a new Firebase project
51
+
52
+
If you don't have a dedicated Firebase project yet, follow the steps to [create a Firebase project](../development/local-dev-setup.md#create-a-new-firebase-project).
53
+
If you already have a dedicated Firebase project, ensure that you have done the following steps:
54
+
55
+
-[create a Realtime Database](../development/local-dev-setup.md#create-a-new-realtime-database)
56
+
-[enable email and password authentication](../development/local-dev-setup.md#enable-email-and-password-authentication)
By default, Firebase creates a service account and API keys.
62
+
The service account likely has more permissions than are needed.
63
+
We recommend to restrict the permissions as much as possible.
64
+
65
+
Go to the [Service Accounts in Google Cloud](https://console.cloud.google.com/projectselector2/iam-admin/serviceaccounts) and select your Firebase project, then:
66
+
67
+
1. Click on the name of the service account that was created for you
68
+
1. Go to "Permissions" and click on "Manage access"
69
+
1. Update the assigned roles to match the following roles:
70
+
-*Firebase Authentication Admin*
71
+
-*Firebase Cloud Messaging Admin*
72
+
-*Firebase Realtime Database Admin*
73
+
-*Firebase Rules Admin*
74
+
1. Click "Save"
75
+
76
+
#### Retrieve the Apple Push Notification certificates
77
+
78
+
!!! note
79
+
80
+
These instructions are specific to *macOS* as they require the *Keychain Access* utility.
81
+
82
+
While push notifications on Android are delivered via *Firebase Cloud Messaging*, on iOS the *Apple Push Notification Service* is used.
83
+
84
+
The following instructions assume that your iOS app has already been created in [App Store Connect](https://appstoreconnect.apple.com/apps) and therefore has an *App ID*.
85
+
86
+
!!! success "Preparation: Generate a *Certificate Signing Request*"
87
+
88
+
As a preparation, follow the instructions to [create a certificate signing request](https://developer.apple.com/help/account/certificates/create-a-certificate-signing-request).
89
+
90
+
Log in to your [Apple Developer Account](https://developer.apple.com/account) and do the following:
We assume that you already [set up your Firebase project](#create-and-set-up-a-new-firebase-project) and [retrieved Firebase client configurations](../development/local-dev-setup.md#retrieve-the-firebase-project-configurations).
145
+
This means that API keys were already created for you.
146
+
By default, Firebase creates a service account and API keys with excessive permissions.
147
+
148
+
!!! question "Can new API keys be created instead?"
149
+
150
+
This is generally possible.
151
+
However, as part of the set up you will need to get a `google-services.json` file.
152
+
When this file is retrieved, Firebase automatically creates corresponding API keys.
153
+
154
+
Go to the [API Credentials in Google Cloud](https://console.cloud.google.com/apis/credentials) and select the corresponding Firebase project.
155
+
156
+
##### Browser key
157
+
158
+
1. The browser key should have a name like "Browser key (auto created by Firebase)"
159
+
160
+
1. Click on its name to edit it
161
+
162
+
1. Under "Application restrictions", choose "Websites"
163
+
164
+
1. Add the following websites at a minimum to allow mobile app users to access this project
0 commit comments