GithubHelp home page GithubHelp logo

isabella232 / okta-implicit-flow-detector Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oktadev/okta-implicit-flow-detector

0.0 0.0 0.0 2.89 MB

A browser extension for Chrome and Firefox to detect the deprecated OAuth 2.0 Implicit flow

License: MIT License

JavaScript 78.66% CSS 9.28% HTML 12.05%

okta-implicit-flow-detector's Introduction

Implicit Flow Detector

TL;DR: This browser extension is now available in both the Google Chrome Webstore and the Firefox Addons.

This browser extension detects websites that use the implicit flow. It does this by scanning urls and looking for id_token and/or access_token in the url.

It works on both Firefox and Chrome. It should work on chromium variants. It doesn't work on Safari.

If the implicit flow is detected, the site url will be added to a tree view in the extension popup. Expanding that tree shows you the token contents. It also shows a yellow indicator for the presence of an id token and a red indicator for the presence of an access token.

The code is vanilla javascript. There is one dependency: browser-polyfill.js, which makes chrome adhere to the standard for browser extensions that mozilla has proposed. This enables it to be a single codebase that works in both chrome and firefox.

Run locally

Install web-ext with:

npm install --global web-ext

Launch firefox and chrome to test:

web-ext run -t chromium -t firefox-desktop

Install in Browsers

The extension is available for Google Chrome and Firefox.

You can also install it locally by following these instructions:

Firefox

Click the hamburger menu in the upper right. Select Add-ons. Click the gear icon. Select Debug Add-ons. Click Load Temporary Add-on.... Select the implicit-flow-detector-0.1.zip file.

Chrome

Click the vertical three dots in the upper right. Select More tools > Extensions. Click the Developer mode slider mode in the upper right. Click the Load unpacked button. Select the folder this README is in.

See it in Action

  1. The icon for the extension is a blue hash symbol. Navigate to: https://okta-oidc-fun.herokuapp.com
  2. Uncheck code and check id token and access token
  3. Click the link the at the bottom of the page
  4. Notice that the extension icon changes from blue to red to indicate that an implicit flow has been detected
  5. Click the red hash icon and you'll see https://okta-oidc-fun.herokuapp.com in the list

implicit detector

Bonus:

You can see additional sites added to the implicit flow detector by going to: OAuth.com Implicit Flow playground and/or Medium post on Implicit Flow.

NOTE: If you do the medium.com example, you'll see that they use an opaque access token and a JWT ID Token. The browser add-on represents these accordingly. It should work with any site that uses the implicit flow.

Good sites for testing

The following urls use the implicit flow and will result information showing in the browser extension:

Building for Release

Next Steps

  • Show a badge with the number of sites detected
  • cleanup iconography and style
  • show the raw tokens in popup
  • show "yellow alert" icon if only id token is detected
  • show "red alert" icons if access token is detected
  • if token(s) are jwts, show claims
  • pretty print claims if present

okta-implicit-flow-detector's People

Contributors

dogeared avatar imgbotapp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.