@@ -194,6 +194,18 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
194194 } ,
195195 } )
196196
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+
197209 server . endpoint ( {
198210 noAuth : true ,
199211 method : 'GET' ,
@@ -210,8 +222,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
210222 const resource = this . adminforth . config . resources . find ( ( res ) => res . resourceId === this . adminforth . config . auth . usersResourceId ) ;
211223 const usernameColumn = resource . columns . find ( ( col ) => col . name === usernameField ) ;
212224
213- const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
214-
215225 return {
216226 brandName : this . adminforth . config . customization . brandName ,
217227 usernameFieldName : usernameColumn . label ,
@@ -220,7 +230,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
220230 removeBackgroundBlendMode : this . adminforth . config . auth . removeBackgroundBlendMode ,
221231 title : this . adminforth . config . customization ?. title ,
222232 demoCredentials : this . adminforth . config . auth . demoCredentials ,
223- loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
224233 loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
225234 globalInjections : {
226235 everyPageBottom : this . adminforth . config . customization . globalInjections . everyPageBottom ,
@@ -295,7 +304,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
295304
296305 const announcementBadge : AnnouncementBadgeResponse = this . adminforth . config . customization . announcementBadge ?.( adminUser ) ;
297306
298- const loginPromptHTML = await getLoginPromptHTML ( this . adminforth . config . auth . loginPromptHTML ) ;
299307
300308
301309 const publicPart = {
@@ -306,7 +314,6 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
306314 removeBackgroundBlendMode : this . adminforth . config . auth . removeBackgroundBlendMode ,
307315 title : this . adminforth . config . customization ?. title ,
308316 demoCredentials : this . adminforth . config . auth . demoCredentials ,
309- loginPromptHTML : await tr ( loginPromptHTML , 'system.loginPromptHTML' ) ,
310317 loginPageInjections : this . adminforth . config . customization . loginPageInjections ,
311318 rememberMeDays : this . adminforth . config . auth . rememberMeDays ,
312319 singleTheme : this . adminforth . config . customization . singleTheme ,
0 commit comments