1.0.0 • Published 6 years ago

puppeteer-signin v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

puppeteer-signin

Build Status Coveralls

use puppeteer to sign in and get cookies

example

import Client from 'puppeteer-signin';

const client = new Client({
  signinUrl: 'http://example/path/to/signin',
  username: 'selector',
  password: 'selector',
  submit: 'selector',
});

(async function main(){
  await client.launch(); // must launch first
  await client.signin('username', 'password');
  const cookies = client.getCookies();
  await client.close(); // should close it if you won't use
  console.log(cookies);
})()

api