0.0.5 • Published 4 years ago

chrome-ext-oauth-sdk v0.0.5

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

Chrome Extension OAuth SDK

npm.io

To implement OAuth flow on your Chrome Extension.

Why?

// TODO: Write something

How to use

// background.js
import { TwitterOAuth } from "chrome-ext-oauth-sdk";
window.twitter = new TwitterOAuth(yourConsumerConfig);
// Your callback page JavaScript
import { ProxyPage } from "chrome-ext-oauth-sdk";
const page = new ProxyPage();
window.onload = () => page.onload();
// then, this page will handle everything automatically
// and finally give token to the opener of this page.
// Let's open the page and trigger OAuth flow.
import { ProxyPage } from "chrome-ext-oauth-sdk";
const token = await ProxyPage.open(yourCallbackPageURL, "twitter");
// { access_token: string, access_token_secret: string }
0.0.5

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago