Skip to content

Instantly share code, notes, and snippets.

@sirpy
Last active May 21, 2019 15:33
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 sirpy/9277f70b2c672e93aae6e24c6bd0ddb0 to your computer and use it in GitHub Desktop.
Save sirpy/9277f70b2c672e93aae6e24c6bd0ddb0 to your computer and use it in GitHub Desktop.
const username = await this.wallet.sign('GoodDollarUser', 'gundb')
const password = await this.wallet.sign('GoodDollarPass', 'gundb')
this.gunuser = gun.user()
return new Promise((res, rej) => {
this.gunuser.create(username, password, async userCreated => {
logger.debug('gundb user created', userCreated)
//auth.then - doesnt seem to work server side in tests
this.gunuser.auth(username, password, user => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment