Skip to content

Instantly share code, notes, and snippets.

@tonyspiro
Last active January 16, 2018 21:01
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 tonyspiro/4dc2900f8c9498a507206a65d40efb2a to your computer and use it in GitHub Desktop.
Save tonyspiro/4dc2900f8c9498a507206a65d40efb2a to your computer and use it in GitHub Desktop.
Cosmic JS NPM module - Authenticate
const Cosmic = require('cosmicjs')()
Cosmic.authenticate({
email: 'you@youremail.com',
password: 'yourpassword'
}).then(data => {
console.log(data)
}).catch(err => {
console.log(err)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment