Skip to content

Instantly share code, notes, and snippets.

Saltuk Alakus saltukalakus

Block or report user

Report or block saltukalakus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
saltukalakus / mailchimp.js
Created Apr 7, 2019
Auth0 rule for sending emails of signed up users to Mailchimp.
View mailchimp.js
* Update a Mailchimp list with user emails during the signup or the first login.
* Create the following atributes in the Auth0 RULE configuration settings.
* 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.:
saltukalakus / auth0_lock_universal.html
Last active Apr 29, 2019
Passwordless and regular login with Lock based on client id
View auth0_lock_universal.html
<!DOCTYPE html>
<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" />
saltukalakus / Pre-registration .js
Created Mar 21, 2019
Pre-registration hook sample script
View Pre-registration .js
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 / public.pem
Created Mar 18, 2019
Custom signature public key for SP side.
View public.pem
saltukalakus / saml-idp-rule.js
Last active Mar 22, 2019
Sample rule for SAML when Auth0 is the IdP
View saml-idp-rule.js
function (user, context, callback) {
// Replace with your applications client ID
var samlIdpClientId = 'YkERwRMChyzRGV2FRqrGK1NkiKEDi4kU';
// only for a specific client
if (context.clientID !== samlIdpClientId) {
return callback(null, user, context);
// Custom certificate for SAML response signing when Auth0 is the IdP
context.samlConfiguration.cert =
saltukalakus / email_liquid.html
Created Feb 19, 2019
Remove the link for a specific app in the Auth0 email template with the Liquid syntax.
View email_liquid.html
{% if != "MY APP NAME" %}
Reset link {{url}}
{% endif %}
saltukalakus / email.html
Last active Feb 15, 2019
Print the user's metadata for the language in the template
View email.html
{% if user.user_metadata.lang %}
<br> {{user.user_metadata.lang}}
{% elsif user.app_metadata.lang %}
<br> {{user.app_metadata.lang}}
{% else %}
  <br> no metadata for the language
{% endif %}
View Resave-metadata.js
function (user, context, callback) {
user.user_metadata = user.user_metadata || {};
user.app_metadata = user.app_metadata || {};
// persist the user_metadata and app_metadata again
auth0.users.updateUserMetadata(user.user_id, user.user_metadata)
.then(auth0.users.updateAppMetadata(user.user_id, user.app_metadata))
callback(null, user, context);
saltukalakus / workaround.html
Last active Feb 2, 2019
A workaround to update the username with the email during signup using JQuery for Lock widget.
View workaround.html
<!DOCTYPE html>
<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" />
saltukalakus / facebook.html
Created Jan 7, 2019
Test facebook - add your appId in FB.init - check console logs for the user profile
View facebook.html
<title>Facebook Login JavaScript Example</title>
<meta charset="UTF-8">
// This is called with the results from from FB.getLoginStatus().
function statusChangeCallback(response) {
// The response object is returned with a status field that lets the app know the current login status of the person.
You can’t perform that action at this time.