Skip to content

Instantly share code, notes, and snippets.

@lukebergen
Created January 31, 2018 20:32
Show Gist options
  • Save lukebergen/944765f4d096f0c5de2e73de6ac6c479 to your computer and use it in GitHub Desktop.
Save lukebergen/944765f4d096f0c5de2e73de6ac6c479 to your computer and use it in GitHub Desktop.
let a0m = require("./server/auth0/mgmt");
let cli = a0m.getAuthenticationClient("password");
const AuthenticationClient = require('auth0').AuthenticationClient;
let cli = new AuthenticationClient({
domain: config.auth0config.domain,
clientId: config.auth0config[clientId],
clientSecret: config.secrets[clientSecret]
});
let user, err;
cli.oauth.passwordGrant({username: <my email>, password: <my password>, realm: "MMID"}, function(e,u) {err = e; user = u;})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment