Skip to content

deeNewearth/react-oauth-popup

 
 

Repository files navigation

react-oauth-popup

CircleCI codecov

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.

Install

npm install react-oauth-popup --save

Props

  • url - the url of the oauth navigation screen (instagram/facebook/etc.)
  • onCode - called when the user has successfully authenticated with the oauth code
  • 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) => console.log("wooooo a code", code);

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

License

MIT

About

react component for doing oauth popups

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 55.1%
  • TypeScript 44.9%