Skip to content

Instantly share code, notes, and snippets.

View saltukalakus's full-sized avatar
🐢
Rust & Cryptography

saltukalakus

🐢
Rust & Cryptography
View GitHub Profile
@saltukalakus
saltukalakus / hosted_email_verification.html
Last active June 2, 2025 20:36
A workaround to check the user email verification state for the Auth0 DB on the hosted page
<!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">
</head>
<style>
@saltukalakus
saltukalakus / group_filter_rule.js
Created April 24, 2019 20:30
Insert the groups which starts with a case insensitive keyword into the ID token with an Auth0 rule
function (user, context, callback) {
const namespace = 'https://acme.com/';
const KEY_WORD = "ruler"; // Any groups which start with Ruler is inserted.
function selectGroups(group) {
return group.toLowerCase().indexOf(KEY_WORD) === 0;
}
context.idToken[namespace + 'groups'] = user.groups &&
user.groups.filter(selectGroups);
callback(null, user, context);
@saltukalakus
saltukalakus / PasswordlessLock.html
Last active June 10, 2025 09:27
A workaround to configure Passwordless Lock with an enterprise connection.
<!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" />
</head>
<body>
@saltukalakus
saltukalakus / hosted_lock.html
Created April 15, 2019 16:50
Show signup tab focused.
<!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" />
</head>
<body>
@saltukalakus
saltukalakus / auth0_hosted.html
Created April 10, 2019 16:59
Map language for Lock with fallback to English
<!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" />
</head>
<body>
@saltukalakus
saltukalakus / README.md
Created April 9, 2019 23:16 — forked from sandrinodimattia/README.md
Upload custom signing certificate in Auth0 Generic SAML-P Connection

Upload custom signing certificate in Auth0 Generic SAML-P Connection

Get or generate a new signing certificate:

openssl req -x509 -nodes -sha256 -days 3650 -newkey rsa:2048 -keyout saml.key -out saml.crt

Update the script and update the following settings:

@saltukalakus
saltukalakus / mailchimp.js
Created April 7, 2019 00:20
Auth0 rule for sending emails of signed up users to Mailchimp.
/*
* Update a Mailchimp list with user emails during the signup or the first login.
*
* Create the following atributes in the Auth0 RULE configuration settings.
* https://auth0.com/docs/rules/guides/configuration
*
* MC_TOKEN: Mailchimp API Token. E.g.: ef235a44355dda3e61ea074ae0d439a2-us20
* MC_LIST_ID: ID of the Mailchimp list you would like to populate. E.g.: ca9eb2555e
* MC_API_URL: Mailchimp API URL. E.g.: https://us20.api.mailchimp.com/3.0
*
@saltukalakus
saltukalakus / auth0_lock_universal.html
Last active June 2, 2025 20:37
Passwordless and regular login with Lock based on client id
<!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" />
</head>
<body>
@saltukalakus
saltukalakus / Pre-registration .js
Created March 21, 2019 17:09
Pre-registration hook sample script
module.exports = function (user, context, cb) {
var response = {};
response.user = user;
// Add user or app metadata to the newly created user
response.user = {
user_metadata: { foo: 'bar' },
app_metadata: { vip: true, score: 7 }
};
@saltukalakus
saltukalakus / public.pem
Created March 18, 2019 23:30
Custom signature public key for SP side.
-----BEGIN CERTIFICATE-----
MIIDVDCCAjwCCQD/IaNvZiZwXTANBgkqhkiG9w0BAQsFADBsMQswCQYDVQQGEwJV
UzELMAkGA1UECAwCTkExCzAJBgNVBAcMAk5BMQswCQYDVQQKDAJOQTELMAkGA1UE
CwwCTkExCzAJBgNVBAMMAk5BMRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRlc3QuY29t
MB4XDTE5MDMxODIzMTg1MFoXDTI5MDMxNTIzMTg1MFowbDELMAkGA1UEBhMCVVMx
CzAJBgNVBAgMAk5BMQswCQYDVQQHDAJOQTELMAkGA1UECgwCTkExCzAJBgNVBAsM
Ak5BMQswCQYDVQQDDAJOQTEcMBoGCSqGSIb3DQEJARYNdGVzdEB0ZXN0LmNvbTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPFP465zqXNLhHmAcQpLKg/s
TqMypLhHyr0erwiyMeaF9qybXqr+yuZsnjNDVtSPsU9Io2Z58dpKRscFtCeEF0qb
C3QDIhW3taZxEW6t6+2PEM0Hp0SqpyNH5ugEaEi+ojS18EKuwPp67Cer8mDUyhjx