fix: initialize configured auth in production builds
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
import { inferIdentityType, normalizeIdentity, publicUser } from "./normalize.ts";
|
||||
import { assertPasskeyProvider, MemoryPasskeyChallengeStore } from "./passkeys/index.ts";
|
||||
import { evaluateAuthRisk } from "./risk.ts";
|
||||
import { setDefaultAuthEngine } from "./runtime.ts";
|
||||
import type { AuthStore } from "./store.ts";
|
||||
import { generateTotpSecret, totpUri, verifyTotp } from "./totp/index.ts";
|
||||
import type {
|
||||
@@ -2298,5 +2299,9 @@ export function createAuthEngine(options: AuthEngineOptions): AuthEngine {
|
||||
},
|
||||
};
|
||||
|
||||
// The application config is evaluated in both dev and generated production
|
||||
// runtimes. Registering here makes that configured engine available to the
|
||||
// package-owned routes without an application startup shim.
|
||||
setDefaultAuthEngine(engine);
|
||||
return engine;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user