- In the Organization context, the template uses the Organization's Logo
- If not in the Organization context, the template uses the Application Logo
- If the Application Logo is missing, the template uses the Tenant Logo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
{%- auth0:head -%} | |
{% if prompt.screen.name == "device-code-confirmation" %} | |
<script> | |
document.addEventListener("DOMContentLoaded", function() { | |
document.addEventListener("click", function(event) { | |
// Check if the clicked element is a button within a form | |
const clickedButton = event.target.closest("form button"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function migrateUsers(user, context, cb) { | |
if (needMigration(user)) { | |
// Ignoring how the values are retrieved from the legacy database | |
var legacyProfile = { | |
family_name: 'alakus', | |
given_name: 'saltuk', | |
user_metadata: { | |
'anotherMetadata' : '123' | |
}, | |
app_metadata: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// auto linking of accounts is NOT OK in most circumstances. | |
// "user-initiated" or "prompted" account linking must be preferred. | |
// https://auth0.com/docs/users/user-account-linking#scenarios | |
function (user, context, callback) { | |
console.log(`account-link rule called ${user.user_id}`); | |
const request = require('request'); | |
// Check if email is verified, we shouldn't automatically merge accounts if this is not the case. | |
// Also, the requirement is to link a currently authenticating Enterprise (federated) Account with | |
// an existing Auth0 Database Account, so thats the only combination we are allowing. | |
if (!user.email || !user.email_verified || user.identities[0].provider === 'auth0') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function VerifyJWT (JwtToken) { | |
const util = require('util') | |
const jwksClientFactory = require('[email protected]') | |
const jwt = require('[email protected]') | |
const verify = util.promisify(jwt.verify) | |
const jwksUri = `https://${configuration.tenant}/.well-known/jwks.json` | |
const jwksClient = jwksClientFactory({ jwksUri }) | |
const getSigningKeys = util.promisify(jwksClient.getSigningKeys).bind(jwksClient) | |
const signingKeys = await getSigningKeys() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Sign In with Auth0</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" /> | |
<style> | |
.auth0-lock-name { | |
font-size: 14px !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>2nd Factor Authentication</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<style type="text/css"> | |
html, body { padding: 0; margin: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>2nd Factor Authentication</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<style type="text/css"> | |
html, body { padding: 0; margin: 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Sign In with Auth0</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="https://unpkg.com/validator@latest/validator.min.js"></script> | |
</head> |
NewerOlder