To enable the personalization of the authentication interfaces, you must define the following variables in your
AUTH_DEVELOPMENT_MODEvariable enables development tools to help with the interface personalization. The development tools include automatic template reloading and developer UI.
AUTH_ASSETS_PATHvariable defines where the system should read the modified authentication interfaces from. Point the
AUTH_ASSETS_PATHvariable to the directory that will contain the modified assets. To examplify;
The path for the
To export the current authentication assets, run the auth assets export command.
Exports embedded assets into the provided path (must exists) Usage: corteza-server auth assets export [flags] Flags: -h, --help help for export
To exemplify; assuming that we will use the
/opt/deploy/corteza/auth-assets directory, run:
corteza-server auth assets export /opt/deploy/corteza/auth-assets
If you’ve already defined the
The produced output looks like this:
exporting auth assets to public directory created exporting asset /opt/deploy/corteza/auth-assets/public/background.jpeg: ok exporting asset /opt/deploy/corteza/auth-assets/public/logo.png: ok exporting asset /opt/deploy/corteza/auth-assets/public/script.js: ok exporting asset /opt/deploy/corteza/auth-assets/public/style.css: ok exporting auth assets to templates directory created exporting asset /opt/deploy/corteza/auth-assets/templates/authorized-clients.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/change-password.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/error-internal.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/inc_footer.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/inc_header.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/inc_nav.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/inc_toasts.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/login.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/logout.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/mfa-totp-disable.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/mfa-totp.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/mfa.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/oauth2-authorize-client.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/password-reset-requested.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/pending-email-confirmation.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/profile.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/request-password-reset.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/reset-password.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/security.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/sessions.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/signup.html.tpl: ok exporting asset /opt/deploy/corteza/auth-assets/templates/template-dev.html.tpl: ok
Rerunning the command will not overwrite the existing files. If you want a fresh start, delete the exported assets and re-export them.
/ public / ... / templates / ---
/public subdirectory contains the assets you can use in your authentication screens, such as images and stylesheets.
You are free to remove, add or change all of the files in the
The public files are served in the same format they are defined here.
/templates subdirectory contains the HTML templates that are used when displaying the authentication screens.
The templates are written in go’s template syntax.
The syntax is the same as with our document templates.
The template file names are important and should not be changed.
You can define additional template files (such as the
If you’ve enabled the
.env variable, the changed assets are already deployed.
Disable the variable after you’re done with the personalizations.
Do not change the
When using docker, make sure to either mount the assets' source as a volume or rebuild a custom image on top of the default image.
The default stylesheet is included from the Bootstrap CDN in the
You are free to change the stylesheet source.
When you enable the
.env variable, you gain access the development tool accessible under the
The development tool displays all of the templates with all of the scenarios.