@@ -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,16 +222,13 @@ 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 ,
218
228
loginBackgroundImage : this . adminforth . config . auth . loginBackgroundImage ,
219
229
loginBackgroundPosition : this . adminforth . config . auth . loginBackgroundPosition ,
220
230
title : this . adminforth . config . customization ?. title ,
221
231
demoCredentials : this . adminforth . config . auth . demoCredentials ,
222
- loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
223
232
loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
224
233
globalInjections : {
225
234
everyPageBottom : this . adminforth . config . customization . globalInjections . everyPageBottom ,
@@ -292,7 +301,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
292
301
293
302
const announcementBadge : AnnouncementBadgeResponse = this . adminforth . config . customization . announcementBadge ?.( adminUser ) ;
294
303
295
- const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
296
304
297
305
298
306
const publicPart = {
@@ -302,7 +310,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
302
310
loginBackgroundPosition : this . adminforth . config . auth . loginBackgroundPosition ,
303
311
title : this . adminforth . config . customization ?. title ,
304
312
demoCredentials : this . adminforth . config . auth . demoCredentials ,
305
- loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
306
313
loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
307
314
rememberMeDays : this . adminforth . config . auth . rememberMeDays ,
308
315
}
0 commit comments