Skip to content

Instantly share code, notes, and snippets.

@jyaunches
Created November 30, 2016 21:34
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 jyaunches/6ddd423a09b1afa3ad2c0b7d3401d8a2 to your computer and use it in GitHub Desktop.
Save jyaunches/6ddd423a09b1afa3ad2c0b7d3401d8a2 to your computer and use it in GitHub Desktop.
Auth0
.authentication().createUser(email: email,
username: username,
password: "hellogrow",
connection: "Username-Password-Authentication",
userMetadata: [:]).start { result in
switch result {
case .success( _):
UserAuthenticationManager.sharedInstance.username = username
UserAuthenticationManager.sharedInstance.email = email
self.loginUser(email: email, onSuccess: onSuccess, onFailure: onFailure)
break
case .failure(let error):
self.handleError(error: error, onFailure: onFailure)
break
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment