everyauth openid モジュールで定義されている OpenId 認証シーケンスにもう 1 つのステップを追加したいと思います。
everyauth がこのために設計されているかどうかはわかりません。著者は、カスタマイズ可能であると述べていますが、例はなく、私はまだ JavaScript 初心者です。
たとえば、everyauth の OAuth モジュールは、認証コールバック手順を次のように定義します。
.get('callbackPath',
'the callback path that the 3rd party OAuth provider redirects to after an OAuth authorization result - e.g., "/auth/facebook/callback"')
.step('getCode')
.description('retrieves a verifier code from the url query')
.accepts('req res')
.promises('code')
.canBreakTo('authCallbackErrorSteps')
.step('getAccessToken')
.accepts('code')
.promises('accessToken extra')
.step('fetchOAuthUser')
.accepts('accessToken')
.promises('oauthUser')
.step('getSession')
.accepts('req')
.promises('session')
.step('findOrCreateUser')
.accepts('session accessToken extra oauthUser')
.promises('user')
.step('compile')
.accepts('accessToken extra oauthUser user')
.promises('auth')
.step('addToSession')
.accepts('session auth')
.promises(null)
.step('sendResponse')
.accepts('res')
.promises(null)
そこに追加のカスタムステップが必要な場合はどうすればよいですか? everyauth モジュールのソース コードは変更しないでください。