Skip to content

Commit b98c0cf

Browse files
committed
fix(docs): add some missing awaits
1 parent 2344901 commit b98c0cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
data.value
4343
4444
// Start the unbranded sign-in flow
45-
signIn()
45+
await signIn()
4646
4747
// Logout the user
4848
await signOut()
@@ -163,7 +163,7 @@ await getCsrfToken()
163163
await getProviders()
164164
165165
// Trigger a sign in, see https://next-auth.js.org/getting-started/client#signin
166-
signIn()
166+
await signIn()
167167
168168
// Trigger a sign out, see https://next-auth.js.org/getting-started/client#signout
169169
await signOut()
@@ -189,14 +189,14 @@ You can also pass the `callbackUrl` option to both the `signIn` and the `signOut
189189
190190
You can use it like:
191191
```ts
192-
signIn({ callbackUrl: '/protected' })
192+
await signIn({ callbackUrl: '/protected' })
193193
```
194194
195195
to redirect the user to the protected page they wanted to access _after_ they've been authenticated.
196196
197197
You can do the same for signing out the user:
198198
```ts
199-
signOut({ callbackUrl: '/protected' })
199+
await signOut({ callbackUrl: '/protected' })
200200
```
201201
202202
E.g., here to redirect the user away from the already loaded, protected, page after signout (else, you will have to handle the redirect yourself).

0 commit comments

Comments
 (0)