Skip to content

Commit c54fdd0

Browse files
docs(auth): sample for script variable client secret
a bit of clarity as suggested by @Lxstr in #6
1 parent 0b2e17b commit c54fdd0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/guide/authentication.rst

+11-1
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,17 @@ used to generate tokens to sign in with social providers in
169169

170170
.. code-block:: python
171171
172-
# Get a reference to the auth service with provider secret set
172+
# Get a reference to the auth service with provider secret file
173173
auth = firebaseApp.auth(client_secret='client-secret-file.json')
174+
175+
# Reference to auth service with provider secret from env variable
176+
client_secret_config = {
177+
"client_id": environ.get("CLIENT_ID"),
178+
"client_secret": environ.get("CLIENT_SECRET"),
179+
"redirect_uris": [environ.get("REDIRECT_URI")]
180+
}
181+
182+
auth = firebaseApp.auth(client_secret=client_secret_config)
174183
..
175184
176185
.. code-block:: python
@@ -186,6 +195,7 @@ used to generate tokens to sign in with social providers in
186195
Make sure you have the **social** provider enabled in your
187196
Firebase dashboard under Authentication -> Sign In Method.
188197

198+
189199
authenticate_login_with_google
190200
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
191201

0 commit comments

Comments
 (0)