Created
October 4, 2018 21:19
-
-
Save ricalamino/884e4661abb720638024d1d15eced7c8 to your computer and use it in GitHub Desktop.
Sign Up Without Lock - Auth0
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
public signUpNoLock(username: string, password: string, name: string) { | |
const postData = { | |
client_id: environment.Auth0.clientID, | |
email: username, | |
password, | |
connection: 'Username-Password-Authentication', | |
user_metadata: { name } | |
}; | |
const req = this.http.post('https://' + environment.Auth0.domain + '/dbconnections/signup', postData, { | |
headers: new HttpHeaders().set('Content-Type', 'application/json') | |
}); | |
req.subscribe((data: any) => { | |
console.log(data); | |
this.loginNoLock(username, password); | |
}, err => { | |
console.log(err); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment