chrome-ext-oauth-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

Chrome Extension OAuth SDK

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 }

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    0
    • latest

Version History

Package Sidebar

Install

npm i chrome-ext-oauth-sdk

Weekly Downloads

4

Version

0.0.5

License

MIT

Unpacked Size

18.2 kB

Total Files

6

Last publish

Collaborators

  • otiai10