Skip to content

Instantly share code, notes, and snippets.

View saltukalakus's full-sized avatar
💭

Saltuk Alakus saltukalakus

💭
View GitHub Profile
@saltukalakus
saltukalakus / README-User-Case-1.md
Last active November 7, 2024 19:10
Logo handling
  • 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
@saltukalakus
saltukalakus / index.html
Last active November 24, 2023 19:17
Prevent multiple click problem for device code confirmation screen
<!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");
@saltukalakus
saltukalakus / migrateUsersRule.js
Last active March 10, 2023 20:04
migrateUsersRule.js
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: {
@saltukalakus
saltukalakus / caution-account-auto-link-rule.js
Created February 13, 2023 20:18 — forked from jatinvaidya/caution-account-auto-link-rule.js
CAUTION: Automatically Link Accounts with Verified Email
@saltukalakus
saltukalakus / verify_rs256.js
Created November 4, 2022 16:44
Verify JWT with rs256 signature
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()
@saltukalakus
saltukalakus / index-only-css.html
Last active October 3, 2022 13:56
Change size of the placeholder
<!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;
@saltukalakus
saltukalakus / curl.sh
Created September 1, 2022 21:17
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 }}" );
@saltukalakus
saltukalakus / classic-mfa-page.html
Last active March 16, 2024 19:59
Get the active client ID on the classic MFA page
<!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; }
@saltukalakus
saltukalakus / ClassicMFA.html
Last active July 18, 2022 17:58
Auth0 classic MFA page with disabled country selection
<!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; }
@saltukalakus
saltukalakus / index.html
Last active July 14, 2022 18:35
Custom Classic Universal Login Page with Email validation.
<!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>