Skip to content

Instantly share code, notes, and snippets.

@saltukalakus
Created September 1, 2022 21:17
Show Gist options
  • Save saltukalakus/8c568f6f6923e9538cbbf1d6f0bc84ec to your computer and use it in GitHub Desktop.
Save saltukalakus/8c568f6f6923e9538cbbf1d6f0bc84ec to your computer and use it in GitHub Desktop.
Auth0 New Universal Login Page template with parameters .
curl --request PUT \
--url https://saltukalakus.auth0.com/api/v2/branding/templates/universal-login \
--header 'Authorization: Bearer eyJ..redacted' \
--header 'Content-Type: text/html' \
--data '<!DOCTYPE html><html lang="{{locale}}">
<head>
{%- auth0:head -%}
<script>
{% if prompt.name == "email-verification" %}
console.log("Email-verification: ", "{{ transaction.params.ext-param }}" );
{% endif %}
{% if prompt.name == "login" %}
console.log("Login: ", "{{ transaction.params.ext-param }}" );
{% endif %}
{% if prompt.name == "reset-password" %}
console.log("Reset-password: ", "{{ transaction.params.ext-param }}");
{% endif %}
</script>
</head>
<body class="_widget-auto-layout">
{%- auth0:widget -%}
</body></html>'
<!DOCTYPE html><html lang="{{locale}}">
<head>
{%- auth0:head -%}
<script>
{% if prompt.name == "email-verification" %}
console.log("Email-verification: ", "{{ transaction.params.ext-param }}" );
{% endif %}
{% if prompt.name == "login" %}
console.log("Login: ", "{{ transaction.params.ext-param }}" );
{% endif %}
{% if prompt.name == "reset-password" %}
console.log("Reset-password: ", "{{ transaction.params.ext-param }}");
{% endif %}
</script>
</head>
<body class="_widget-auto-layout">
{%- auth0:widget -%}
</body></html>
@saltukalakus
Copy link
Author

Screen Shot 2022-09-02 at 00 24 09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment