Skip to content

add missing step for credntials provider #12949

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: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add missing step
  • Loading branch information
elbasel42 authored May 10, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit d158dc25c98991696f2fe9f4d2d2602a3d4cb360
8 changes: 6 additions & 2 deletions docs/pages/getting-started/authentication/credentials.mdx
Original file line number Diff line number Diff line change
@@ -40,8 +40,9 @@ To use the `Credentials Provider`, you’ll first need to import and configure i
Here’s how to set it up:

1. Import the provider.
2. Add it to the `providers` array in your `Auth.js` config.
3. Define the `credentials` and `authorize` fields.
2. Set the session strategy
3. Add it to the `providers` array in your `Auth.js` config.
4. Define the `credentials` and `authorize` fields.

#### `credentials`

@@ -93,6 +94,9 @@ import Credentials from "next-auth/providers/credentials"
import { saltAndHashPassword } from "@/utils/password"

export const { handlers, signIn, signOut, auth } = NextAuth({
session: {
strategy: "jwt",
},
providers: [
Credentials({
// You can specify which fields should be submitted, by adding keys to the `credentials` object.