New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@epfl-si/appauth

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epfl-si/appauth

A simple (and GDPR-compliant) wrapper for @openid/appauth

  • 0.11.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

@epfl-si/appauth

An unopinionated state machine for OpenID-Connect that wraps @openid/appauth in a browser-, developer- and GDPR-friendly way.

Feature Overview

  • Browser-side OpenID-Connect implementation, meaning all the backend server has left to do is validate bearer tokens with the OIDC identity provider (IdP)
    • Redirects the browser to the authorization server for the login operation
    • When redirected back, consumes (and cleans out) the code=, state=, error= and session_state= parts from the URL bar, regardless of whether they are found before or after the hash mark and whether the login operation was successful
    • Obtains OAuth2 tokens using fetch, not jQuery
    • Schedules access token refresh a few seconds before it expires
  • Brings out the best in @openid/appauth's underlying feature set
    • Uses the modern and secure OAuth2 authorization code flow
    • (Untested) Supports extra redirect parameters, to activate features such as user consent in authentication servers that support them
    • PKCE support
  • Supports cookie-less, local-storage-less operation
    • This is in fact the default mode (unlike in @openid/appauth)
    • Obviously, this has a cost with respect to security: no state= validation, PKCE is disabled

How to Use

From a browser

  1. Create an HTML file like this one

Reference manual

See API.md on GitHub

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc