Skip to content
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

add authentication docs page #60388

Merged
merged 47 commits into from
Jan 18, 2024
Merged

add authentication docs page #60388

merged 47 commits into from
Jan 18, 2024

Conversation

StephDietz
Copy link
Contributor

@StephDietz StephDietz commented Jan 8, 2024

I've updated the Next.js documentation to include a new page covering the best practices for implementing authentication. This doc covers the essential concepts of authentication in Next.js, focusing on practical strategies, effective session management, and robust authorization techniques.

Key aspects of the update:

  • Core Authentication Concepts: Introduced foundational concepts of authentication, detailing their relevance and application in Next.js projects.
  • Diverse Authentication Strategies: Expanded on various authentication strategies, providing insights on when and how to use them effectively in different scenarios.
  • Implementing Authentication in Next.js: Guided through the implementation process, illustrating the use of middleware, server actions, and route handlers to create a secure and user-friendly authentication system.
  • Session Management Techniques: Discussed different approaches to session management, highlighting their pros and cons to aid in choosing the most suitable method for specific project needs.
  • Securing Application Access: Detailed how to protect routes and manage user permissions, ensuring that access is granted appropriately based on user roles and authentication status.
  • Next.js Compatible Solutions: Included references to several compatible authentication solutions for Next.js, facilitating easy integration and setup.

@ijjk
Copy link
Member

ijjk commented Jan 8, 2024

Allow CI Workflow Run

  • approve CI run for commit: 5301848

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@StephDietz StephDietz marked this pull request as ready for review January 8, 2024 19:43
@StephDietz StephDietz requested review from ismaelrumzan and removed request for a team January 8, 2024 19:43
@StephDietz StephDietz requested a review from ijjk as a code owner January 8, 2024 19:43
@StephDietz StephDietz requested a review from molebox January 8, 2024 19:43
…ex.mdx

Co-authored-by: Balázs Orbán <info@balazsorban.com>
@balazsorban44 balazsorban44 enabled auto-merge (squash) January 18, 2024 14:19
@balazsorban44 balazsorban44 merged commit 65fce8a into canary Jan 18, 2024
35 checks passed
@balazsorban44 balazsorban44 deleted the authentication-docs branch January 18, 2024 14:21
@sokra
Copy link
Member

sokra commented Jan 18, 2024

This causes a build error on next-site:

next-site:dev-webpack: ✘ [ERROR] Unexpected character `!` (U+0021) before name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a comment in MDX, use `{/* text */}`) [plugin @mdx-js/esbuild]
next-site:dev-webpack: 
next-site:dev-webpack:     _mdx_bundler_entry_point-abe20b89-718a-4640-8893-fcb291d00e45.mdx:541:4:
next-site:dev-webpack:       541 │    <!-- TODO: Change link to authjs.dev when new documentation is...
next-site:dev-webpack:           ╵     ^
next-site:dev-webpack: 
next-site:dev-webpack: Error: Found 1 problems in 600 documents.
next-site:dev-webpack: 
next-site:dev-webpack:  └── Encountered unexpected errors while processing of 1 documents. This is possibly a bug in Contentlayer. Please open an issue.
next-site:dev-webpack:      
next-site:dev-webpack:      • "docs/02-app/01-building-your-application/09-authentication/index.mdx": UnexpectedMDXError: Error: Build failed with 1 error:
next-site:dev-webpack:      _mdx_bundler_entry_point-abe20b89-718a-4640-8893-fcb291d00e45.mdx:541:4: ERROR: [plugin: @mdx-js/esbuild] Unexpected character `!` (U+0021) before name, expected a character that can start a name, such as a letter, `$`, or `_` (note: to create a comment in MDX, use `{/* text */}`)
next-site:dev-webpack:      

@sokra
Copy link
Member

sokra commented Jan 18, 2024

fix here: #60824

@StephDietz
Copy link
Contributor Author

fix here: #60824

We have the fix queued here

@github-actions github-actions bot added the locked label Feb 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants