Skip to content

Commit

Permalink
Update errors.md
Browse files Browse the repository at this point in the history
  • Loading branch information
iaincollins committed Oct 30, 2020
1 parent d7dc7b0 commit ccfa1d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion www/docs/errors.md
Expand Up @@ -61,7 +61,13 @@ The Email authentication provider can only be used if a database is configured.

#### CALLBACK_CREDENTIALS_JWT_ERROR

The Credentials authentication provider can only be used if JSON Web Tokens are used for sessions.
The Credentials Provider can only be used if JSON Web Tokens are used for sessions.

JSON Web Tokens are used for Sessions by default if you have not specified a database. However if you are using a database, then Database Sessions are enabled by default and you need to [explictly enable JWT Sessions](https://next-auth.js.org/configuration/options#session) to use the Credentials Provider.

If you are using a Credentials Provider, NextAuth.js will not persist users or sessions in a database - user accounts used with the Credentials Provider must be created and manged outside of NextAuth.js.

In _most cases_ it does not make sense to specify a database in NextAuth.js options and support a Credentials Provider.

#### CALLBACK_CREDENTIALS_HANDLER_ERROR
---
Expand Down

1 comment on commit ccfa1d5

@vercel
Copy link

@vercel vercel bot commented on ccfa1d5 Oct 30, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.