Never-ending Pumpkin Mulch

    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 }

    Install

    npm i chrome-ext-oauth-sdk

    DownloadsWeekly Downloads

    1

    Version

    0.0.5

    License

    MIT

    Unpacked Size

    18.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • otiai10