Skip to content

Commit a288c19

Browse files
authored
Update fullstack-authentication-with-next-js-and-cloudflare-d1.mdx
You need the `{ async: true }` to get this working. It took me a while to figure that out.
1 parent 3b96a4a commit a288c19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/content/docs/developer-spotlight/tutorials/fullstack-authentication-with-next-js-and-cloudflare-d1.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ const authResult = async (): Promise<NextAuthResult> => {
210210
return NextAuth({
211211
providers: [
212212
Resend({
213-
apiKey: (await getCloudflareContext()).env.AUTH_RESEND_KEY,
214-
from: (await getCloudflareContext()).env.AUTH_EMAIL_FROM,
213+
apiKey: (await getCloudflareContext({ async: true })).env.AUTH_RESEND_KEY,
214+
from: (await getCloudflareContext({ async: true })).env.AUTH_EMAIL_FROM,
215215
}),
216216
],
217-
adapter: D1Adapter((await getCloudflareContext()).env.DB),
217+
adapter: D1Adapter((await getCloudflareContext({ async: true })).env.DB),
218218
});
219219
};
220220

0 commit comments

Comments
 (0)