コンテンツへスキップ
NextAuth.js v4 からの移行ですか? 移行ガイドをお読みください.

errors

AccessDenied

signIn コールバックの実行に失敗した場合、または false を返した場合にスローされます。

拡張

コンストラクター

new AccessDenied(message, errorOptions)

new AccessDenied(message?, errorOptions?): AccessDenied
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

AccessDenied

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "AccessDenied";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


AccountNotLinked

メールアドレスが既にアカウントに関連付けられているが、ユーザーがそれに関連付けられていないアカウントを試している場合にスローされます。

セキュリティ上の理由から、Auth.jsは、ユーザーがサインインしていない場合、既存のアカウントにアカウントを自動的にリンクしません。

拡張

コンストラクタ

new AccountNotLinked(message, errorOptions)

new AccountNotLinked(message?, errorOptions?): AccountNotLinked
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

AccountNotLinked

継承元

SignInError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

SignInError.cause

message

message: string;
継承元

SignInError.message

name

name: string;
継承元

SignInError.name

stack?

optional stack: string;
継承元

SignInError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

kind

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

type

static type: string = "AccountNotLinked";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


AdapterError

データベースのAdapter メソッドのいずれかが実行中に失敗しました。

💡

debug: true が設定されている場合は、ログの [auth][debug] を調べて、失敗したアダプターメソッドの実行について詳しく知ることができます。

[auth][debug]: adapter_getUserByEmail
{ "args": [undefined] }

拡張

コンストラクタ

new AdapterError(message, errorOptions)

new AdapterError(message?, errorOptions?): AdapterError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

AdapterError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "AdapterError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


AuthError

すべての Auth.js エラーの基本エラークラス。 logger.errorオプションを介して、サーバーログに適切にフォーマットされて出力されるように最適化されています。

拡張

コンストラクタ

new AuthError(message, errorOptions)

new AuthError(message?, errorOptions?): AuthError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

AuthError

オーバーライド

Error.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
オーバーライド

Error.cause

メッセージ

message: string;
継承元

Error.message

名前

name: string;
継承元

Error.name

スタック?

optional stack: string;
継承元

Error.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

Error.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

Error.stackTraceLimit

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

Error.captureStackTrace


CallbackRouteError

このエラーは、ユーザーがログインを完了できない場合に発生します。プロバイダーのタイプによっては、複数の理由で発生する可能性があります。

💡

どのプロバイダーでエラーが発生したかを確認するには、ログの[auth][details]を参照してください。

[auth][details]: { "provider": "github" }

OAuthプロバイダーの場合、考えられる原因は次のとおりです。

  • ユーザーがアプリケーションへのアクセスを拒否した場合
  • OAuthプロファイルの解析中にエラーが発生した場合:プロバイダーのprofileまたはuserinfo.requestメソッドがユーザーのプロファイルを正しくフェッチしていることを確認してください。
  • signInまたはjwtコールバックメソッドがキャッチされないエラーをスローした場合:コールバックメソッドの実装を確認してください。

メールプロバイダーの場合、考えられる原因は次のとおりです。

  • 提供されたメール/トークンの組み合わせが無効/欠落していた場合:プロバイダーのsendVerificationRequestメソッドがメールを正しく送信しているか確認してください。
  • 提供されたメール/トークンの組み合わせが期限切れになった場合:ユーザーに再度ログインするように促してください。
  • データベースでエラーが発生した場合:データベースのログを確認してください。

資格情報プロバイダーの場合、考えられる原因は次のとおりです。

  • authorizeメソッドがキャッチされないエラーをスローした場合:プロバイダーのauthorizeメソッドを確認してください。
  • signInまたはjwtコールバックメソッドがキャッチされないエラーをスローした場合:コールバックメソッドの実装を確認してください。
💡

詳細については、エラーメッセージの[auth][cause]を参照してください。元のスタックトレースが表示されます。

拡張

コンストラクター

new CallbackRouteError(message, errorOptions)

new CallbackRouteError(message?, errorOptions?): CallbackRouteError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

CallbackRouteError

継承元

AuthError.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "CallbackRouteError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


CredentialsSignin

資格情報プロバイダーのauthorizeコールバックからスローされる可能性があります。authorizeコールバック中にエラーが発生した場合、2つのことが起こる可能性があります。

  1. ユーザーはサインインページにリダイレクトされ、URLにerror=CredentialsSignin&code=credentialsが含まれます。codeは設定可能です。
  2. フォームアクションをサーバー側で処理するフレームワークでこのエラーをスローすると、ユーザーをリダイレクトする代わりにこのエラーがスローされるため、処理する必要があります。

拡張

コンストラクター

new CredentialsSignin(message, errorOptions)

new CredentialsSignin(message?, errorOptions?): CredentialsSignin
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

CredentialsSignin

継承元

SignInError.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
継承元

SignInError.cause

コード

code: string = "credentials";

リダイレクトURLのcodeクエリパラメータに設定されるエラーコードです。

⚠ 注意:このプロパティはURLに含まれるため、機密性の高いエラーを示唆しないようにしてください。

デバッグする必要がある場合、完全なエラーは常にサーバーにログ記録されます。

一般的に、ユーザーが間違ったユーザー名またはパスワードを入力したかどうかを具体的に示すことはお勧めしません。「無効な資格情報」のように試してください。

メッセージ

message: string;
継承元

SignInError.message

名前

name: string;
継承元

SignInError.name

スタック?

optional stack: string;
継承元

SignInError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

種類

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

static type: string = "CredentialsSignin";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


DuplicateConditionalUI

複数のプロバイダーでenableConditionalUItrueに設定されている場合にスローされます。このオプションを一度に有効にできるプロバイダーは1つのみです。

拡張

コンストラクター

new DuplicateConditionalUI(message, errorOptions)

new DuplicateConditionalUI(message?, errorOptions?): DuplicateConditionalUI
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

DuplicateConditionalUI

継承元

AuthError.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

タイプ

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

タイプ

static type: string = "DuplicateConditionalUI";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


EmailSignInError

メールプロバイダーによるログインを開始できなかった場合に発生します。

考えられる原因は次のとおりです。

  • クライアントから送信されたメールが無効であるか、EmailConfig.normalizeIdentifierによって正規化できなかった。
  • 提供されたメール/トークンの組み合わせが期限切れになった場合:ユーザーに再度ログインするように促してください。
  • データベースでエラーが発生した場合:データベースのログを確認してください。

拡張

コンストラクター

new EmailSignInError(message, errorOptions)

new EmailSignInError(message?, errorOptions?): EmailSignInError
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

EmailSignInError

継承元

SignInError.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
継承元

SignInError.cause

メッセージ

message: string;
継承元

SignInError.message

名前

name: string;
継承元

SignInError.name

スタック?

optional stack: string;
継承元

SignInError.stack

タイプ

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

種類

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

タイプ

static type: string = "EmailSignInError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


ErrorPageLoop

Auth.jsが誤って設定され、カスタムエラーページで認証を要求しようとした場合にスローされます。無限ループを防ぐため、Auth.jsは代わりにデフォルトのエラーページをレンダリングします。

これを修正するには、errorページが認証を必要としないことを確認してください。

ガイド: エラーページで詳細をご覧ください。

拡張

コンストラクター

new ErrorPageLoop(message, errorOptions)

new ErrorPageLoop(message?, errorOptions?): ErrorPageLoop
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

ErrorPageLoop

継承元

AuthError.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

タイプ

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

タイプ

static type: string = "ErrorPageLoop";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


EventError

events メソッドのいずれかが実行中に失敗しました。

events メソッドが正しく実装されており、キャッチされないエラーが処理されることを確認してください。

eventsで詳細をご覧ください。

拡張

コンストラクター

new EventError(message, errorOptions)

new EventError(message?, errorOptions?): EventError
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

EventError

継承元

AuthError.constructor

プロパティ

原因?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
エラー?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

引数
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "EventError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

引数
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


ExperimentalFeatureNotEnabled

実験的な機能が使用されたが有効になっていない場合にスローされます。

拡張

コンストラクタ

new ExperimentalFeatureNotEnabled(message, errorOptions)

new ExperimentalFeatureNotEnabled(message?, errorOptions?): ExperimentalFeatureNotEnabled
引数
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

ExperimentalFeatureNotEnabled

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

引数
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "ExperimentalFeatureNotEnabled";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

引数
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


InvalidCallbackUrl

Auth.js が callbackUrl 値を検証できない場合にスローされます。ブラウザが Cookie を無効にしているか、callbackUrl が有効な URL ではありません。

誰かが、Auth.js がユーザーを構成された callbackUrl/ページにリダイレクトするために使用するコールバック URL を操作しようとした可能性があります。これは、ユーザーをフィッシングサイトにリダイレクトしようとする悪意のあるハッカーである可能性があります。これを防ぐため、Auth.js はコールバック URL が有効かどうかをチェックし、無効な場合はこのエラーをスローします。

アクションは必要ありませんが、誰かがアプリケーションを攻撃しようとしている可能性がある兆候かもしれません。

拡張

コンストラクタ

new InvalidCallbackUrl(message, errorOptions)

new InvalidCallbackUrl(message?, errorOptions?): InvalidCallbackUrl
引数
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

InvalidCallbackUrl

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

引数
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "InvalidCallbackUrl";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

引数
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


InvalidCheck

PKCE、state、または nonce OAuth チェックを実行できなかった場合にスローされます。これは、OAuth プロバイダーが正しく構成されていない場合、またはブラウザが Cookie をブロックしている場合に発生する可能性があります。

checks で詳細をご覧ください。

拡張

コンストラクタ

new InvalidCheck(message, errorOptions)

new InvalidCheck(message?, errorOptions?): InvalidCheck
引数
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

InvalidCheck

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "InvalidCheck";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


InvalidEndpoints

構成されたOAuthまたはOIDCプロバイダーのいずれかに、authorizationtokenuserinfo、またはissuerの構成が欠落しています。OAuthまたはOIDCサインインを実行するには、これらのエンドポイントの少なくとも1つが必要です。

OAuth2Configまたはガイド: OAuthプロバイダーで詳細をご覧ください。

拡張

コンストラクター

new InvalidEndpoints(message, errorOptions)

new InvalidEndpoints(message?, errorOptions?): InvalidEndpoints
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

InvalidEndpoints

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "InvalidEndpoints";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


InvalidProvider

プロバイダーなしで、またはサポートされていないプロバイダーでエンドポイントが誤って呼び出された場合にスローされます。

拡張

コンストラクター

new InvalidProvider(message, errorOptions)

new InvalidProvider(message?, errorOptions?): InvalidProvider
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

InvalidProvider

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "InvalidProvider";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


JWTSessionError

Auth.jsがJWTベース(strategy: "jwt")セッションをデコードまたはエンコードできなかった場合にサーバーに記録されます。

考えられる原因は、secretの設定ミス、または不正な形式のJWTまたはencode/decodeメソッドです。

このエラーが記録されると、セッションCookieが破棄されます。

詳細については、secretjwt.encodeまたはjwt.decodeを参照してください。

拡張

コンストラクター

new JWTSessionError(message, errorOptions)

new JWTSessionError(message?, errorOptions?): JWTSessionError
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

JWTSessionError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "JWTSessionError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


MissingAdapter

Auth.js の設定が誤っている場合にスローされます。これは、Email プロバイダーを設定したにもかかわらず、データベースアダプターを設定しなかった場合、またはデータベースアダプターなしで strategy: "database" セッションを使用しようとした場合に発生する可能性があります。いずれの場合も、設定を削除するか、不足しているアダプターを追加してください。

データベースアダプターEmail プロバイダー、または 概念:データベースセッション戦略 で詳細をご覧ください。

拡張

コンストラクター

new MissingAdapter(message, errorOptions)

new MissingAdapter(message?, errorOptions?): MissingAdapter
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

MissingAdapter

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "MissingAdapter";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


MissingAdapterMethods

MissingAdapter と同様にスローされますが、必要なメソッドの一部のみが不足していました。

設定を削除するか、不足しているメソッドをアダプターに追加してください。

データベースアダプター で詳細をご覧ください。

拡張

コンストラクター

new MissingAdapterMethods(message, errorOptions)

new MissingAdapterMethods(message?, errorOptions?): MissingAdapterMethods
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

MissingAdapterMethods

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "MissingAdapterMethods";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


MissingAuthorize

Credentials プロバイダーに authorize 設定がない場合にスローされます。資格情報サインインを実行するには、authorize メソッドが必要です。

資格情報プロバイダー で詳細をご覧ください。

拡張

コンストラクター

new MissingAuthorize(message, errorOptions)

new MissingAuthorize(message?, errorOptions?): MissingAuthorize
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

MissingAuthorize

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "MissingAuthorize";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


MissingCSRF

クライアント側のアクション(signInsignOutuseSession#update)でCSRFトークンが不足している場合のエラー。CSRF保護に不可欠なダブルサブミットクッキーがないアクションを実行した場合にスローされます。

CSRF(クロスサイトリクエストフォージェリ)は、認証されたユーザーの資格情報を不正なアクションに利用する攻撃です。

CSRF対策であるダブルサブミットクッキーパターンでは、クッキーとリクエストパラメータの値が一致する必要があります。詳細については、MDN Web Docsを参照してください。

拡張

コンストラクタ

new MissingCSRF(message, errorOptions)

new MissingCSRF(message?, errorOptions?): MissingCSRF
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

MissingCSRF

継承元

SignInError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

SignInError.cause

メッセージ

message: string;
継承元

SignInError.message

名前

name: string;
継承元

SignInError.name

スタック?

optional stack: string;
継承元

SignInError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

種類

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

static type: string = "MissingCSRF";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


MissingSecret

Auth.jsでは、秘密鍵または複数の秘密鍵の設定が必要ですが、見つかりませんでした。これは、クッキー、JWT、その他の機密データを暗号化するために使用されます。

Next.jsのようなフレームワークを使用している場合、AUTH_SECRETAUTH_SECRET_1などの環境変数から秘密鍵を自動的に推測しようとします。または、AuthConfig.secretオプションを明示的に設定することもできます。

💡

ランダムな文字列を生成するには、Auth.js CLIを使用できます:npx auth secret

拡張

コンストラクタ

new MissingSecret(message, errorOptions)

new MissingSecret(message?, errorOptions?): MissingSecret
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

MissingSecret

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "MissingSecret";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


MissingWebAuthnAutocomplete

WebAuthnプロバイダのenableConditionalUItrueに設定されているにもかかわらず、formFieldのautocompleteパラメータにwebauthnが含まれていない場合にスローされます。

条件付きUIを機能させるには、webauthnのautocompleteパラメータが必要です。

拡張

コンストラクタ

new MissingWebAuthnAutocomplete(message, errorOptions)

new MissingWebAuthnAutocomplete(message?, errorOptions?): MissingWebAuthnAutocomplete
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

MissingWebAuthnAutocomplete

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "MissingWebAuthnAutocomplete";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


OAuthAccountNotLinked

メールアドレスがすでにアカウントに関連付けられているが、ユーザーがそれに関連付けられていないOAuthアカウントを試している場合にスローされます。

セキュリティ上の理由から、Auth.jsはユーザーがサインインしていない場合、OAuthアカウントを既存のアカウントに自動的にリンクしません。

💡

OAuthプロバイダーがユーザーのメールアドレスを確認していると信頼できる場合は、プロバイダーの設定でallowDangerousEmailAccountLinking: trueを設定することで、自動アカウントリンクを有効にできます。

拡張

コンストラクター

new OAuthAccountNotLinked(message, errorOptions)

new OAuthAccountNotLinked(message?, errorOptions?): OAuthAccountNotLinked
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

OAuthAccountNotLinked

継承元

SignInError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

SignInError.cause

message

message: string;
継承元

SignInError.message

name

name: string;
継承元

SignInError.name

stack?

optional stack: string;
継承元

SignInError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

kind

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

type

static type: string = "OAuthAccountNotLinked";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


OAuthCallbackError

OAuthプロバイダーがサインインプロセス中にエラーを返した場合にスローされます。これは、たとえばユーザーがアプリケーションへのアクセスを拒否した場合や、構成エラーが発生した場合に発生する可能性があります。

考えられる理由の完全なリストについては、承認コード付与:エラーレスポンスの仕様を確認してください。

拡張

コンストラクター

new OAuthCallbackError(message, errorOptions)

new OAuthCallbackError(message?, errorOptions?): OAuthCallbackError
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

OAuthCallbackError

継承元

SignInError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

SignInError.cause

message

message: string;
継承元

SignInError.message

name

name: string;
継承元

SignInError.name

stack?

optional stack: string;
継承元

SignInError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

kind

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

type

static type: string = "OAuthCallbackError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


OAuthProfileParseError

このエラーは、OAuthサインインの試行中に、プロバイダーの応答を解析できなかった場合に発生します。これは、たとえば、プロバイダーのAPIが変更された場合や、OAuth2Config.profileメソッドが正しく実装されていない場合に発生する可能性があります。

拡張

コンストラクター

new OAuthProfileParseError(message, errorOptions)

new OAuthProfileParseError(message?, errorOptions?): OAuthProfileParseError
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

OAuthProfileParseError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "OAuthProfileParseError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


OAuthSignInError

OAuthによるログインが開始できなかった場合に発生します。

考えられる原因は次のとおりです。

  • 認証サーバーがOAuth 2.0またはOIDC仕様に準拠していません。エラーメッセージの詳細を確認してください。
💡

どのプロバイダーでエラーが発生したかを確認するには、ログの[auth][details]を参照してください。

[auth][details]: { "provider": "github" }

拡張

コンストラクタ

new OAuthSignInError(message, errorOptions)

new OAuthSignInError(message?, errorOptions?): OAuthSignInError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

OAuthSignInError

継承元

SignInError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

SignInError.cause

message

message: string;
継承元

SignInError.message

name

name: string;
継承元

SignInError.name

stack?

optional stack: string;
継承元

SignInError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

SignInError.type

kind

static kind: string = "signIn";
継承元

SignInError.kind

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

SignInError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

SignInError.stackTraceLimit

type

static type: string = "OAuthSignInError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

SignInError.captureStackTrace


SessionTokenError

Auth.jsがデータベースからセッションを取得できなかった場合(strategy: "database")、サーバーにログが記録されます。

データベースアダプターが正しく設定されていないか、データベースに接続できない可能性があります。

詳細については、コンセプト:データベースセッション戦略を参照してください。

拡張

コンストラクタ

new SessionTokenError(message, errorOptions)

new SessionTokenError(message?, errorOptions?): SessionTokenError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

SessionTokenError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "SessionTokenError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


SignInError

すべての Auth.js エラーの基本エラークラス。 logger.errorオプションを介して、サーバーログに適切にフォーマットされて出力されるように最適化されています。

拡張

コンストラクタ

new SignInError(message, errorOptions)

new SignInError(message?, errorOptions?): SignInError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

SignInError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

kind

static kind: string = "signIn";

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


SignOutError

サインアウト処理中に発生するエラーを表します。このエラーは、ユーザーのセッションを終了する際に、データベースからセッションを削除できなかった(データベースセッション戦略の場合)、またはサインアウトイベントの発行やセッションクッキーのクリアなど、サインアウトプロセスの他の部分で問題が発生した場合に記録されます。

このエラーが記録された場合でも、セッションクッキーは空になります。

拡張

コンストラクター

new SignOutError(message, errorOptions)

new SignOutError(message?, errorOptions?): SignOutError
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

SignOutError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "SignOutError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


UnknownAction

Auth.js は、サポートしていない操作を処理するように要求されました。

サポートされているアクションについては、AuthAction を参照してください。

拡張

コンストラクター

new UnknownAction(message, errorOptions)

new UnknownAction(message?, errorOptions?): UnknownAction
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

UnknownAction

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "UnknownAction";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


UnsupportedStrategy

クレデンシャルプロバイダーが存在するが、JWT 戦略(strategy: "jwt")が有効になっていない場合にスローされます。

詳細については、strategy または クレデンシャルプロバイダー を参照してください。

拡張

コンストラクター

new UnsupportedStrategy(message, errorOptions)

new UnsupportedStrategy(message?, errorOptions?): UnsupportedStrategy
パラメーター
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

UnsupportedStrategy

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

message

message: string;
継承元

AuthError.message

name

name: string;
継承元

AuthError.name

stack?

optional stack: string;
継承元

AuthError.stack

type

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメーター
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

type

static type: string = "UnsupportedStrategy";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメーター
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


UntrustedHost

trustHost オプションが true に設定されていない場合にスローされます。

Auth.js は、リクエストヘッダーの host 値に依存しているため、trustHost オプションを true に設定する必要があります。

公式の Auth.js ライブラリは、リクエストが信頼されたプラットフォームの信頼されたホストから来ている場合、trustHost オプションを自動的に true に設定しようとする場合があります。

詳細については、trustHost または ガイド: デプロイメント を参照してください。

拡張

コンストラクター

new UntrustedHost(message, errorOptions)

new UntrustedHost(message?, errorOptions?): UntrustedHost
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

UntrustedHost

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "UntrustedHost";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


検証

ユーザーのメール/トークンの組み合わせが無効でした。これは、メール/トークンの組み合わせがデータベースに見つからなかったか、トークンが期限切れになったかのいずれかである可能性があります。ユーザーに再度ログインを求めてください。

拡張

コンストラクタ

new Verification(message, errorOptions)

new Verification(message?, errorOptions?): Verification
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

Verification

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "Verification";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace


WebAuthnVerificationError

WebAuthnプロバイダーがクライアント応答の検証に失敗した場合にスローされます。

拡張

コンストラクタ

new WebAuthnVerificationError(message, errorOptions)

new WebAuthnVerificationError(message?, errorOptions?): WebAuthnVerificationError
パラメータ
パラメーター
message?string | ErrorOptions
errorOptions?ErrorOptions
戻り値

WebAuthnVerificationError

継承元

AuthError.constructor

プロパティ

cause?

optional cause: Record<string, unknown> & {
  err: Error;
};
型宣言
err?
optional err: Error;
継承元

AuthError.cause

メッセージ

message: string;
継承元

AuthError.message

名前

name: string;
継承元

AuthError.name

スタック?

optional stack: string;
継承元

AuthError.stack

type: ErrorType;

エラーのタイプ。ログでエラーを識別するために使用されます。

継承元

AuthError.type

prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any;

スタックトレースのフォーマットをカスタマイズするためのオプションのオーバーライド

参照

https://v8.dokyumento.jp/docs/stack-trace-api#customizing-stack-traces

パラメータ
パラメーター
errエラー
stackTracesCallSite[]
戻り値

任意

継承元

AuthError.prepareStackTrace

stackTraceLimit

static stackTraceLimit: number;
継承元

AuthError.stackTraceLimit

static type: string = "WebAuthnVerificationError";

メソッド

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

ターゲットオブジェクトに .stack プロパティを作成します

パラメータ
パラメーター
targetObjectオブジェクト
constructorOpt?関数
戻り値

void

継承元

AuthError.captureStackTrace

Auth.js © Balázs Orbán and Team -2024