Skip to content

Commit aa22d59

Browse files
authored
docs: Add docs for specifying env vars for google client secret and firebase service account key (#298)
1 parent c7f20b4 commit aa22d59

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

docs/06-concepts/07-configuration.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,16 @@ The following secrets are used by official Serverpod packages:
8989

9090
- [serverpod_cloud_storage_gcp](https://pub.dev/packages/serverpod_cloud_storage_gcp): Google Cloud Storage
9191
- [serverpod_cloud_storage_s3](https://pub.dev/packages/serverpod_cloud_storage_s3): Amazon S3
92-
93-
| Environment variable | Passwords file | Default | Description |
94-
| ---------------------------- | --------------- | ------- | ------------------------------------------------------------------------- |
95-
| SERVERPOD_HMAC_ACCESS_KEY_ID | HMACAccessKeyId | - | The access key ID for HMAC authentication for serverpod_cloud_storage_gcp |
96-
| SERVERPOD_HMAC_SECRET_KEY | HMACSecretKey | - | The secret key for HMAC authentication for serverpod_cloud_storage_gcp |
97-
| SERVERPOD_AWS_ACCESS_KEY_ID | AWSAccessKeyId | - | The access key ID for AWS authentication for serverpod_cloud_storage_s3 |
98-
| SERVERPOD_AWS_SECRET_KEY | AWSSecretKey | - | The secret key for AWS authentication for serverpod_cloud_storage_s3 |
92+
- [serverpod_auth_server](https://pub.dev/packages/serverpod_auth_server): Serverpod Auth Server
93+
94+
| Environment variable | Passwords file | Default | Description |
95+
| ----------------------------------------------------------- | ---------------------------------------- | ------- | ----------------------------------------------------------------------------- |
96+
| SERVERPOD_HMAC_ACCESS_KEY_ID | HMACAccessKeyId | - | The access key ID for HMAC authentication for serverpod_cloud_storage_gcp |
97+
| SERVERPOD_HMAC_SECRET_KEY | HMACSecretKey | - | The secret key for HMAC authentication for serverpod_cloud_storage_gcp |
98+
| SERVERPOD_AWS_ACCESS_KEY_ID | AWSAccessKeyId | - | The access key ID for AWS authentication for serverpod_cloud_storage_s3 |
99+
| SERVERPOD_AWS_SECRET_KEY | AWSSecretKey | - | The secret key for AWS authentication for serverpod_cloud_storage_s3 |
100+
| SERVERPOD_PASSWORD_serverpod_auth_googleClientSecret | serverpod_auth_googleClientSecret | - | The client secret for Google authentication for serverpod_auth_server |
101+
| SERVERPOD_PASSWORD_serverpod_auth_firebaseServiceAccountKey | serverpod_auth_firebaseServiceAccountKey | - | The service account key for Firebase authentication for serverpod_auth_server |
99102

100103
#### Custom Secrets
101104

docs/06-concepts/11-authentication/04-providers/02-google.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Create the server credentials in the google cloud console. Navigate to _Credenti
4040

4141
Download the JSON file for your web application OAuth client. This file contains both the client id and the client secret. Rename the file to `google_client_secret.json` and place it in your server's `config` directory.
4242

43+
Alternatively, you can provide the contents of the JSON file through the environment variable `SERVERPOD_PASSWORD_serverpod_auth_googleClientSecret`.
44+
4345
:::warning
4446

4547
The `google_client_secret.json` contains a private key and should not be version controlled.

docs/06-concepts/11-authentication/04-providers/05-firebase.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ The server needs the service account credentials for access to your Firebase pro
1616

1717
This will download the JSON file, rename it to `firebase_service_account_key.json` and place it in the `config` folder in your server project. Note that if this file is corrupt or if the name does not follow the convention here the authentication with firebase will fail.
1818

19+
Alternatively, you can provide the contents of the JSON file through the environment variable `SERVERPOD_PASSWORD_serverpod_auth_firebaseServiceAccountKey`.
20+
1921
:::danger
2022
The firebase_service_account_key.json file gives admin access to your Firebase project, never store it in version control.
2123
:::
@@ -87,8 +89,8 @@ You can also trigger the Firebase auth UI by calling the method `signInWithFireb
8789

8890
```dart
8991
await signInWithFirebase(
90-
context: context,
91-
caller: client.modules.auth,
92+
context: context,
93+
caller: client.modules.auth,
9294
authProviders: [
9395
firebase.PhoneAuthProvider(),
9496
],

0 commit comments

Comments
 (0)