Skip to content

Commit 0e328fc

Browse files
committed
updated README regarding signInWithCustomToken
1 parent eae4423 commit 0e328fc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,20 @@ server.signInWithEmail('[email protected]', '123456')
166166
})
167167
```
168168

169+
#### signInWithCustomToken()
170+
171+
To sign a user using a self-signed custom token, use the `signInWithCustomToken()` function. It accepts one parameter, the custom token:
172+
173+
```javascript
174+
server.signInWithCustomToken(TOKEN)
175+
.then((user) => {
176+
console.log('User successfully logged in', user)
177+
})
178+
.catch((err) => {
179+
console.error('User signin error', err);
180+
})
181+
```
182+
169183
#### signInWithProvider()
170184

171185
We can use an external authentication provider, such as twitter/facebook for authentication. In order to use an external provider, we need to include another library to handle authentication.

0 commit comments

Comments
 (0)