Hi,
i would like to know if there is a CLI command to update HTML page in universal login page. I usually update the HTML file manually by copy and pasting the contents of login.html to branding->universal login-> login->HTML and save it to see the changes. I am trying to see if i would be able to automate the process of updating this when a new code is pushed. Please let me know.
Thanks,
Suguna
Hi @srajendran,
You could use the Auth0 CLI to update your Universal Login page:
Or you could use the Management API to update the Universal Login page:
https://auth0.com/docs/api/management/v2/branding/put-universal-login
Please let me know if you have any questions.
Thanks,
Rueben
Could you provide me a exact CLI command if possible?
Hi @srajendran,
You can view the template by calling:
auth0 universal-login templates show
And to update the template using:
auth0 universal-login templates update
Hi @rueben.tiow , Thank you for your time in answering my questions. Does the CLI command shared by you be used for the custom html page which i wanted to update or it is used only for the default templates?
Hi @srajendran,
Thanks for following up.
These commands allow you to customize your Universal Login Custom HTML page.
Thanks,
Rueben
Hi Ruebe,
When i try to curl, “curl -L ‘https://login.auth0.com/api/v2/branding/templates/universal-login’
-H ‘Accept: application/json’”, it says missing authorization error. how do i get through this?
Hi @srajendran,
Thanks for the reply.
Using the Management API’s Set template for New Universal Login experience endpoint, please use the following command to update your Universal Login HTML page:
curl -L -X PUT 'https://YOUR_DOMAIN.REGION.auth0.com/api/v2/branding/templates/universal-login' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access_token}' \
-d '{"template":"<!DOCTYPE html><html><head>{%- auth0:head -%}</head><body>{%- auth0:widget -%}</body></html>"}'
Thanks,
Rueben
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.