Repository navigation
Commit 3ec293d
committed
refactor(plugin-auth): move the better-auth global before-hook into auth-manager-before-hook.ts
The body of the arrow createAuthInstance passes to createAuthMiddleware
for hooks.before moves unedited into globalBeforeHook, re-indented four
levels. hooks.before keeps its place in the config literal; its arrow
now builds one host of the nineteen AuthManager members the body reads
(eighteen methods as late-bound closures, config as a getter) and
returns globalBeforeHook.call(host, ctx, setShouldSkipSessionRefresh).
The async moved from the arrow to the function. The one
createAuthInstance local the arrow read, setShouldSkipSessionRefresh,
is the function's second parameter under the same name; the body's one
static read, AuthManager.OPERATOR_PROVISIONING_TICKET_FIELD, is a value
import of the class, read at call time. Nine imports leave
auth-manager.ts with it.
Two readers outside the move follow it: the api-error-code pin counts
the new module among the auth manager's files, and the vocabulary
gate's APIError argument census names it as the live member's file.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LSXBc2GCBwiAL7vV4kWkyr1 parent 93a6ba4 commit 3ec293d
4 files changed
Lines changed: 734 additions & 597 deletions
File tree
- packages/plugins/plugin-auth/src
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| |||
0 commit comments