@@ -5,15 +5,13 @@ import TwoFactorsAuthPlugin from '../../plugins/adminforth-two-factors-auth/inde
55import ForeignInlineListPlugin from '../../plugins/adminforth-foreign-inline-list/index.js' ;
66import UploadPlugin from '../../plugins/adminforth-upload/index.js' ;
77import AdminForthStorageAdapterLocalFilesystem from "../../adapters/adminforth-storage-adapter-local/index.js" ;
8- import AdminForthAdapterS3Storage from '../../adapters/adminforth-storage-adapter-amazon-s3/index.js' ;
9- import AdminForthAdapterGoogleOauth2 from '../../adapters/adminforth-oauth-adapter-google/index.js' ;
108import OpenSignupPlugin from '../../plugins/adminforth-open-signup/index.js' ;
11- import OAuthPlugin from '../../plugins/adminforth-oauth/index.js' ;
129import DashboardPlugin from '../../plugins/adminforth-dashboard/index.js' ;
1310import KeyValueAdapterRam from '../../adapters/adminforth-key-value-adapter-ram/index.js' ;
1411import AdminForthAgent from '../../plugins/adminforth-agent/index.js' ;
1512import CompletionAdapterOpenAIResponses from '../../adapters/adminforth-completion-adapter-openai-responses/index.js' ;
1613import OpenAIAudioAdapter from '../../adapters/adminforth-audio-adapter-openai/index.js' ;
14+ import OAuthPlugin from './configs/oauthPluginConfig.js' ;
1715
1816const OVH_AI_ENDPOINTS_BASE_URL = 'https://oai.endpoints.kepler.ai.cloud.ovh.net/v1' ;
1917const ovhAiEndpointsAccessToken = process . env . OVH_AI_ENDPOINTS_ACCESS_TOKEN ;
@@ -199,31 +197,7 @@ export default {
199197 role : 'user' ,
200198 } ,
201199 } ) ,
202- new OAuthPlugin ( {
203- userAvatarField : "avatar" ,
204- adapters : [
205- new AdminForthAdapterGoogleOauth2 ( {
206- clientID : process . env . GOOGLE_CLIENT_ID as string ,
207- clientSecret : process . env . GOOGLE_CLIENT_SECRET as string ,
208- useOpenIdConnect : false ,
209- } ) ,
210- ] ,
211- emailField : 'email' ,
212- openSignup : {
213- enabled : true ,
214- defaultFieldValues : { // Set default values for new users
215- role : 'user' ,
216- } ,
217- } ,
218- externalIdentityResource : {
219- resourceId : 'admin_user_external_identities' ,
220- emailField : 'email' ,
221- phoneField : 'phone' ,
222- fullNameField : 'fullName' ,
223- avatarUrlField : 'avatarUrl' ,
224- metaField : 'meta' ,
225- } ,
226- } ) ,
200+ OAuthPlugin ,
227201 ...( process . env . OPENAI_API_KEY ?
228202 [
229203 new AdminForthAgent ( {
0 commit comments