Skip to content

Update authentication.mdx to include 'use server' directives #80951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

bhurlow
Copy link

@bhurlow bhurlow commented Jun 26, 2025

The next.js App Router Authentication Guide demonstrates how to manage cookie setting in a server action, but the docs don't specify the requirement of 'use server' for the action, which I believe is required since these are server APIs

@ijjk ijjk added the Documentation Related to Next.js' official documentation. label Jun 26, 2025
@@ -135,6 +141,8 @@ export type FormState =
```

```js filename="app/lib/definitions.js" switcher
'use server'

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this one might cause errors - cuz these are not async functions right? #80293

Could you verify this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Related to Next.js' official documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy