You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@realrisman/react-oauth-popup

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@realrisman/react-oauth-popup

Open a simple popup to authenticate via oAuth


Version published
Weekly downloads
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-oauth-popup

Node.js CI

OAuth-Popups are some pretty nasty jams that don't fit well in React. This component allows you declare an oauth-popup inline with your components and handles the nasty window navigation for you.

Please note: This component currently only supports OAuth Authorization Code grant type (see: OAuth2 Grant Types OAuth2 Simplified)

Install

NPM:

npm install react-oauth-popup --save

Yarn:

yarn add react-oauth-popup

Props

  • url - the url of the oauth navigation screen (instagram/facebook/etc.)
  • onCode - called when the user has successfully authenticated with the oauth code
  • onClose - called when the popup will be closed
  • width - width of the popup window (optional)
  • height - height of the popup window (optional)
  • title - title of the popup window (optional)

Example

const onCode = (code, params) => {
  console.log("wooooo a code", code);
  console.log("alright! the URLSearchParams interface from the popup url", params);
}
const onClose = () => console.log("closed!");

function Comp() {
  return (
    <OauthPopup
      url="http://FriendlyMultiNationalTechConglomerate.com"
      onCode={onCode}
      onClose={onClose}
    >
      <div>Click me to open a Popup</div>
    </OauthPopup>
	);
}

License

MIT

FAQs

Package last updated on 09 Aug 2022

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc