errors
AdapterErrorβ
Todoβ
One of the database Adapter
methods failed.
Extendsβ
AuthError
AuthorizedCallbackErrorβ
Todoβ
Extendsβ
AuthError
CallbackRouteErrorβ
This error occurs when the user cannot finish the sign-in process. Depending on the provider type, this could have happened for multiple reasons.
Check out [auth][details]
in the error message to know which provider failed.
Exampleβ
[auth][details]: { "provider": "github" }
For an OAuth provider, possible causes are:
- The user denied access to the application
- There was an error parsing the OAuth Profile:
Check out the provider's
profile
oruserinfo.request
method to make sure it correctly fetches the user's profile. - The
signIn
orjwt
callback methods threw an uncaught error: Check the callback method implementations.
For an Email provider, possible causes are:
- The provided email/token combination was invalid/missing:
Check if the provider's
sendVerificationRequest
method correctly sends the email. - The provided email/token combination has expired: Ask the user to log in again.
- There was an error with the database: Check the database logs.
For a Credentials provider, possible causes are:
- The
authorize
method threw an uncaught error: Check the provider'sauthorize
method. - The
signIn
orjwt
callback methods threw an uncaught error: Check the callback method implementations.
Check out [auth][cause]
in the error message for more details.
It will show the original stack trace.
Extendsβ
AuthError
ErrorPageLoopβ
Todoβ
Extendsβ
AuthError
EventErrorβ
Todoβ
Extendsβ
AuthError
InvalidCallbackUrlβ
Todoβ
Extendsβ
AuthError
InvalidCheckβ
Todoβ
Extendsβ
AuthError
InvalidEndpointsβ
Todoβ
Extendsβ
AuthError
JWTSessionErrorβ
Todoβ
Extendsβ
AuthError
MissingAPIRouteβ
Todoβ
Extendsβ
AuthError
MissingAdapterβ
Todoβ
Extendsβ
AuthError
MissingAdapterMethodsβ
Todoβ
Extendsβ
AuthError
MissingAuthorizeβ
Todoβ
Extendsβ
AuthError
MissingSecretβ
Auth.js requires a secret to be set, but none was not found. This is used to encrypt cookies, JWTs and other sensitive data.
If you are using a framework like Next.js, we try to automatically infer the secret from the AUTH_SECRET
environment variable.
Alternatively, you can also explicitly set the AuthConfig.secret
.
You can generate a good secret value:
- On Unix systems: type
openssl rand -hex 32
in the terminal - Or generate one online
Extendsβ
AuthError
OAuthAccountNotLinkedβ
Todoβ
Thrown when an Email address is already associated with an account but the user is trying an OAuth account that is not linked to it.
Extendsβ
AuthError
OAuthCallbackErrorβ
Thrown when an OAuth provider returns an error during the sign in process. This could happen for example if the user denied access to the application or there was a configuration error.
For a full list of possible reasons, check out the specification Authorization Code Grant: Error Response
Extendsβ
AuthError
OAuthCreateUserErrorβ
Todoβ
Extendsβ
AuthError
OAuthProfileParseErrorβ
This error occurs during an OAuth sign in attempt when the provdier's
response could not be parsed. This could for example happen if the provider's API
changed, or the OAuth2Config.profile
method is not implemented correctly.
Extendsβ
AuthError
SessionTokenErrorβ
Todoβ
Extendsβ
AuthError
SignInErrorβ
This error occurs when the user cannot initiate the sign-in process. Depending on the provider type, this could have happened for multiple reasons.
Check out [auth][details]
in the error message to know which provider failed.
Exampleβ
[auth][details]: { "provider": "github" }
For an OAuth provider, possible causes are:
- The Authorization Server is not compliant with the OAuth 2.0 specifcation Check the details in the error message.
- A runtime error occurred in Auth.js. This should be reported as a bug.
For an Email provider, possible causes are:
- The email sent from the client is invalid, could not be normalized by
EmailConfig.normalizeIdentifier
- The provided email/token combination has expired: Ask the user to log in again.
- There was an error with the database: Check the database logs.
Extendsβ
AuthError
SignOutErrorβ
Todoβ
Extendsβ
AuthError
UnknownActionβ
Auth.js was requested to handle an operation that it does not support.
See AuthAction
for the supported actions.
Extendsβ
AuthError
UnsupportedStrategyβ
Todoβ
Extendsβ
AuthError
UntrustedHostβ
Todoβ
Extendsβ
AuthError
Verificationβ
The user's email/token combination was invalid. This could be because the email/token combination was not found in the database, or because it token has expired. Ask the user to log in again.
Extendsβ
AuthError