File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ const sharedIdentityCreatePreAuthRateLimiter = new FixedWindowSketchRateLimiter(
6060 IDENTITY_CREATE_RATE_LIMIT ,
6161 IDENTITY_CREATE_RATE_WINDOW_MS ,
6262) ;
63+ const sharedSponsorOidcService = new SponsorOidcService ( ) ;
6364
6465export type CreateAppOptions = {
6566 storage ?: AuthStorage ;
@@ -71,6 +72,7 @@ export type CreateAppOptions = {
7172 deferTask ?: DeferredTaskScheduler ;
7273 identityCreatePreAuthRateLimiter ?: RequestRateLimiter ;
7374 identityCreateRateLimiter ?: RequestRateLimiter ;
75+ sponsorOidcService ?: SponsorOidcService ;
7476} ;
7577
7678export type StartServerOptions = {
@@ -107,7 +109,7 @@ export function createApp(options: CreateAppOptions = {}): Hono<AppEnv> {
107109 const identityCreateRateLimiter =
108110 options . identityCreateRateLimiter ?? sharedIdentityCreateRateLimiter ;
109111 const config = normalizeConfig ( options ) ;
110- const sponsorOidcService = new SponsorOidcService ( ) ;
112+ const sponsorOidcService = options . sponsorOidcService ?? sharedSponsorOidcService ;
111113
112114 app . onError ( ( error , c ) => {
113115 if ( isStorageOverloadedError ( error ) ) {
You can’t perform that action at this time.
0 commit comments