Skip to content

Generate xoauth string from oauth 1.0 token for Gmail IMAP login.

Notifications You must be signed in to change notification settings

cioc/gmail-xoauth

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

gmail-xoauth

This module generates xoauth string from oauth 1.0 token for Gmail IMAP login. The logic is taken from http://code.google.com/p/google-mail-xoauth-tools/source/browse/trunk/python/xoauth.py.

Installation

$ npm install gmail-xoauth

Example

var ImapConnection = require('imap').ImapConnection,
    XOauth = require('gmail-xoauth');

xoauth = new XOauth(<consumer key>, <consumer secret>);

var imapConfig = {
  username: <email address>,
  xoauth: xoauth.generateIMAPXOauthString(<email address>, <oauth token>, <oauth token secret>),
  host: 'imap.gmail.com',
  port: '993',
  secure: true
}

var imap = new ImapConnection(this.imapConfig);

About

Generate xoauth string from oauth 1.0 token for Gmail IMAP login.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%