JSPM

  • Created
  • Published
  • Downloads 168548
  • Score
    100M100P100Q161821F
  • License MIT

OAuth 2.0 clients for popular providers

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arctic) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Arctic

    Documentation: arcticjs.dev

    Arctic is a collection of OAuth 2.0 clients for popular providers. Only the authorization code flow is supported. Built on top of the Fetch API, it's light weight, fully-typed, and runtime-agnostic.

    npm install arctic
    import * as arctic from "arctic";
    
    const github = new arctic.GitHub(clientId, clientSecret);
    
    const state = arctic.generateState();
    const scopes = ["user:email"];
    const authorizationURL = github.createAuthorizationURL(state, scopes);
    
    // ...
    
    const tokens = await github.validateAuthorizationCode(code);
    const accessToken = tokens.accessToken();

    Arctic only supports providers that follow the OAuth 2.0 spec (including PKCE and token revocation).

    Semver

    Arctic does not strictly follow semantic versioning. While we aim to only introduce breaking changes in major versions, we may introduce them in a minor update if a provider updates their API in a non-backward compatible way. However, they will never be introduced in a patch update.

    Supported providers

    • 42 School
    • Amazon Cognito
    • AniList
    • Apple
    • Atlassian
    • Auth0
    • Authentik
    • Battle.net
    • Bitbucket
    • Box
    • Bungie
    • Coinbase
    • Discord
    • DonationAlerts
    • Dribbble
    • Dropbox
    • Etsy
    • Epic Games
    • Facebook
    • Figma
    • Gitea
    • GitHub
    • GitLab
    • Google
    • Intuit
    • Kakao
    • KeyCloak
    • Kick
    • Lichess
    • Line
    • Linear
    • LinkedIn
    • MercadoLibre
    • MercadoPago
    • Microsoft Entra ID
    • MyAnimeList
    • Naver
    • Notion
    • Okta
    • osu!
    • Patreon
    • Polar
    • Reddit
    • Roblox
    • Salesforce
    • Shikimori
    • Slack
    • Spotify
    • Start.gg
    • Strava
    • Synology
    • TikTok
    • Tiltify
    • Tumblr
    • Twitch
    • Twitter
    • VK
    • WorkOS
    • Yahoo
    • Yandex
    • Zoom