Login Page
Documentation on how to customize the login page.
Last updated
Documentation on how to customize the login page.
Last updated
Login page customization requires a license.
The login page colors, image, copyright and title can be customized by editing the .universal/loginPage.ps1
file.
You can host an image by using Published Folders. In this example, we have a dbatools.png
file in our local folder.
Next, we can create a loginPage.ps1
file in the repository folder. Add the various colors, text and image URL to customize the login page. As soon as you save this file, you can refresh the login page to see the result.
This login page looks like this.
This feature will be available in PowerShell Universal 2.3.
In addition to being able to customize the login page via PowerShell, you can also do so in the admin console. Click Settings \ Login page to adjust the settings.
You can override the login page with an app by setting an app's base URL to /login
. You need to ensure that the app does not require authentication.
You will then need to implement the login features manually.
This is an example of implementing an app-based login page using email addresses and passcodes. The user would enter their email address, the app would send a passcode to the account and cache it locally. Once the user redirects back to the app, they will be logged in.
The app used for login has two different modes. The first is when no query string parameters are specified. The second is when the user is redirected back to the app with the passcode.
The resulting app will look like this when loaded.
After submitting the form, the following will be shown. Additionally, the passcode is cached into the server cache with Set-PSUCache
.
A URL will be generated and, in this example, copied to the clipboard.
Within the admin console, navigate to the forms authentication method and add the following logic. This logic checks the cache to see if the passcode and email address combination is valid. When the user logs in, the JavaScript on the app will run and force a login. Once complete, the user will be redirected to another page.