Skip to content

Commit df54b13

Browse files
ahron1mikehardy
andauthored
docs(auth): add note about using user token vs uid (#5428)
* Added information about the ID Token which should be used to authenticate with the backend server. * add getIdToken / uid to spellcheck dictionary Co-authored-by: Mike Hardy <[email protected]>
1 parent 127c87d commit df54b13

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.spellcheck.dict.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ firebase
5353
Firebase
5454
firebase-ios-sdk
5555
Firestore
56+
getIdToken
5657
GDPR
5758
globals
5859
Gradle
@@ -143,6 +144,7 @@ timezones
143144
triaging
144145
TypeDoc
145146
UI
147+
uid
146148
uncomment
147149
unhandled
148150
unsubscriber

docs/auth/usage/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ with the [`User`](/reference/auth/user) details.
170170
In case any errors occur, the module provides support for identifying what specifically went wrong by attaching a code
171171
to the error. For a full list of error codes available, view the [Firebase documentation](https://firebase.google.com/docs/reference/js/firebase.auth.Auth#error-codes_3).
172172

173+
## Authenticate with backend server
174+
175+
The user's token should be used for authentication with your backend systems. The token is fetched with the [getIdToken](https://rnfirebase.io/reference/auth/user#getIdToken) method. As mentioned in the [Firebase documentation](https://firebase.google.com/docs/auth/web/manage-users#get_a_users_profile), the uid should not be used for authentication.
176+
173177
## Signing out
174178

175179
If you'd like to sign the user out of their current authentication state, call the `signOut` method:

0 commit comments

Comments
 (0)