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
};
}
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> |
Custom DB script for connecting with root teant which stores the user information. The login script uses authentication api and exeucte ROPG. get_user script uses apiv2 to query and return the user information
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
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
config.vm.provision :docker | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = true | |
vb.memory = "2048" | |
vb.cpus = 2 |
For auth0-spa-js
and auth0-react
- any extra options you pass to the SDK will be sent as custom params to the authorization server when redirecting to /authorize
endpoint, eg
const auth0 = await createAuth0Client({
domain: '<AUTH0_DOMAIN>',
client_id: '<AUTH0_CLIENT_ID>',
redirect_uri: '<MY_CALLBACK_URL>',
// Pass custom parameters to login & silent auth
customParam="foo"
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
// Exported user profile | |
{ | |
"created_at": "2019-09-13T10:31:27.130Z", | |
"email": "[email protected]", | |
"email_verified": false, | |
"identities": [ | |
{ | |
"profileData": { |
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) { | |
const BANKID = 'SwedishBankID!NorwegianBankID!SuomiFi'; | |
if (context.protocol === "redirect-callback") { | |
return callback(null, user, context); | |
} | |
if (!BANKID.includes(context.connection) ) { | |
return callback(null, user, context); | |
} |
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
curl --location --request PUT 'https://[Auth0 Domain]/api/v2/prompts/login/custom-text/en' \ | |
--header 'Authorization: Bearer {Management API token}' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"login": { | |
"usernamePlaceholder": "Enter username or email address", | |
"passwordPlaceholder":"Enter password" | |
} | |
}' |
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
const fs = require('fs'); | |
const path = require('path'); | |
// This function reads the main.tf file and splits it into sections based on resources | |
function splitTerraformFile(filePath) { | |
const content = fs.readFileSync(filePath, 'utf-8'); | |
// Matches all resource blocks | |
const resourceRegex = /resource\s+"([^"]+)"\s+"([^"]+)"\s+\{[\s\S]+?\n\}/g; | |
let match; |