Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@woloski
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woloski/80ec142706fd19d07225 to your computer and use it in GitHub Desktop.
Save woloski/80ec142706fd19d07225 to your computer and use it in GitHub Desktop.
update a connection and its config
PUT https://YOUR-ACCOUNT.auth0.com/api/connections/YOUR-CONNECTION-NAME
content-type: application/json
authorization: Bearer ACCESS-TOKEN
{
"options": {
"bareConfiguration": {
"test": "foo3"
},
"enabledDatabaseCustomization":true,
"customScripts": {
"login": "function login (email, password, callback) {\n console.log(configuration.test); \n console.log('connecting to the database...');\n console.log('quering...');\n\n //if ( email === xx && bcrypt.compareSync(password, user.password)) { }\n \n var profile = {\n user_id: \"103547991597142817347\",\n nickname: \"johnfoo\",\n email: \"johnfoo@gmail.com\",\n name: \"John Foo\",\n given_name: \"John\",\n family_name: \"Foo\"\n };\n \n callback(null, profile);\n}\n"
}
},
"status": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment