function userWhitelist(user, context, callback) {
// Skipping rule execution if clientId and connection does not match
if (context.clientID !== '[Client ID]' && context.connection !== '[Connection Name]'){
return callback(null,user,context);
}
// Access should only be granted to verified users.
if (!user.email || !user.email_verified) {
This file contains hidden or 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"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.css" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/intlTelInput.min.js"></script> |
function (user, context, callback) {
console.log("executing rule ");
if (context.clientID === 'ULw7vqL2WK41DIwc2r4QxP78bISpQ2pN') {
console.log("Adding claim rule ");
const namespace = 'https://example.com/auth0-delegated-admin';
context.idToken[namespace] = {
roles: (context.authorization || {}).roles
};
}
This file contains hidden or 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
#!/bin/bash | |
#Step 1: | |
sudo apt-get install testdisk -y | |
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list | |
sudo apt-get update -y | |
sudo apt-get install build-essential autoconf libtool git-core -y |
This file contains hidden or 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
<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" | |
@@AssertServiceURLAndDestination@@ | |
AssertionConsumerServiceURL="https://demo-saml-sp.auth0.com/login/callback" | |
ID="@@ID@@" | |
IssueInstant="@@IssueInstant@@" | |
ProtocolBinding="@@ProtocolBinding@@" Version="2.0"> | |
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@@Issuer@@</saml:Issuer> | |
</samlp:AuthnRequest> |
https://auth0.com/docs/connections/social/oauth2
Configuration:
- Authorization URL : https://slack.com/oauth/v2/authorize?user_scope=identity.basic,identity.email,identity.team,identity.avatar
- Token URL : https://slack.com/api/oauth.v2.access
- Scope : ""
- Cliet ID : "Obtain from slack"
- Client Secret: "Obtain from Slack"
This file contains hidden or 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" /> | |
</head> | |
<body> |
This file contains hidden or 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
tenant: | |
device_flow: | |
mask: '***-***-***-***' | |
charset: digits | |
flags: | |
enable_dynamic_client_registration: false | |
enable_custom_domain_in_emails: false | |
allow_legacy_delegation_grant_types: false | |
allow_legacy_ro_grant_types: false | |
allow_other_legacy_grant_types: false |
This file contains hidden or 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 (user, context, callback) { | |
user.user_metadata = user.user_metadata || {}; | |
var audience = ''; | |
audience = audience || | |
(context.request && context.request.query && context.request.query.audience) || | |
(context.request && context.request.body && context.request.body.audience); | |
if (audience === '[API identifier]') { | |
user.user_metadata.apis = audience; |
This file contains hidden or 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
Auth0 Node 4 to 8 migration guide |