@@ -194,6 +194,18 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
194
194
} ,
195
195
} )
196
196
197
+ server . endpoint ( {
198
+ noAuth : true ,
199
+ method : 'GET' ,
200
+ path : '/get_login_form_config' ,
201
+ handler : async ( { tr } ) => {
202
+ const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
203
+ return {
204
+ loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
205
+ }
206
+ }
207
+ } )
208
+
197
209
server . endpoint ( {
198
210
noAuth : true ,
199
211
method : 'GET' ,
@@ -210,8 +222,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
210
222
const resource = this . adminforth . config . resources . find ( ( res ) => res . resourceId === this . adminforth . config . auth . usersResourceId ) ;
211
223
const usernameColumn = resource . columns . find ( ( col ) => col . name === usernameField ) ;
212
224
213
- const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
214
-
215
225
return {
216
226
brandName : this . adminforth . config . customization . brandName ,
217
227
usernameFieldName : usernameColumn . label ,
@@ -220,7 +230,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
220
230
removeBackgroundBlendMode : this . adminforth . config . auth . removeBackgroundBlendMode ,
221
231
title : this . adminforth . config . customization ?. title ,
222
232
demoCredentials : this . adminforth . config . auth . demoCredentials ,
223
- loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
224
233
loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
225
234
globalInjections : {
226
235
everyPageBottom : this . adminforth . config . customization . globalInjections . everyPageBottom ,
@@ -295,7 +304,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
295
304
296
305
const announcementBadge : AnnouncementBadgeResponse = this . adminforth . config . customization . announcementBadge ?.( adminUser ) ;
297
306
298
- const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
299
307
300
308
301
309
const publicPart = {
@@ -306,7 +314,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
306
314
removeBackgroundBlendMode : this . adminforth . config . auth . removeBackgroundBlendMode ,
307
315
title : this . adminforth . config . customization ?. title ,
308
316
demoCredentials : this . adminforth . config . auth . demoCredentials ,
309
- loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
310
317
loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
311
318
rememberMeDays : this . adminforth . config . auth . rememberMeDays ,
312
319
singleTheme : this . adminforth . config . customization . singleTheme ,
0 commit comments