@@ -139,6 +139,7 @@ const createGitHubProvider = (clientId: string, clientSecret: string, baseUrl?:
139139 ] . join ( ' ' ) ,
140140 } ,
141141 } ,
142+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
142143 } ) ;
143144}
144145
@@ -168,13 +169,15 @@ const createGitLabProvider = (clientId: string, clientSecret: string, baseUrl?:
168169 userinfo : {
169170 url : `${ url } /api/v4/user` ,
170171 } ,
172+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
171173 } ) ;
172174}
173175
174176const createGoogleProvider = ( clientId : string , clientSecret : string ) : Provider => {
175177 return Google ( {
176178 clientId : clientId ,
177179 clientSecret : clientSecret ,
180+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
178181 } ) ;
179182}
180183
@@ -183,6 +186,7 @@ const createOktaProvider = (clientId: string, clientSecret: string, issuer: stri
183186 clientId : clientId ,
184187 clientSecret : clientSecret ,
185188 issuer : issuer ,
189+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
186190 } ) ;
187191}
188192
@@ -191,6 +195,7 @@ const createKeycloakProvider = (clientId: string, clientSecret: string, issuer:
191195 clientId : clientId ,
192196 clientSecret : clientSecret ,
193197 issuer : issuer ,
198+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
194199 } ) ;
195200}
196201
@@ -199,6 +204,16 @@ const createMicrosoftEntraIDProvider = (clientId: string, clientSecret: string,
199204 clientId : clientId ,
200205 clientSecret : clientSecret ,
201206 issuer : issuer ,
207+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
208+ } ) ;
209+ }
210+
211+ export const createAuthentikProvider = ( clientId : string , clientSecret : string , issuer : string ) : Provider => {
212+ return Authentik ( {
213+ clientId : clientId ,
214+ clientSecret : clientSecret ,
215+ issuer : issuer ,
216+ allowDangerousEmailAccountLinking : env . AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING === 'true' ,
202217 } ) ;
203218}
204219
@@ -207,7 +222,7 @@ const createGCPIAPProvider = (audience: string): Provider => {
207222 id : "gcp-iap" ,
208223 name : "Google Cloud IAP" ,
209224 credentials : { } ,
210- authorize : async ( credentials , req ) => {
225+ authorize : async ( _credentials , req ) => {
211226 try {
212227 const iapAssertion = req . headers ?. get ( "x-goog-iap-jwt-assertion" ) ;
213228 if ( ! iapAssertion || typeof iapAssertion !== "string" ) {
@@ -277,11 +292,3 @@ const createGCPIAPProvider = (audience: string): Provider => {
277292 } ,
278293 } ) ;
279294}
280-
281- export const createAuthentikProvider = ( clientId : string , clientSecret : string , issuer : string ) : Provider => {
282- return Authentik ( {
283- clientId : clientId ,
284- clientSecret : clientSecret ,
285- issuer : issuer ,
286- } ) ;
287- }
0 commit comments