react-instagram-oauth
React component for simple OAuth with Instagram
Last updated 2 years ago by alexandrtovmach .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-instagram-oauth 
SYNC missed versions from official npm registry.

react-instagram-oauth

npm npm bundle size npm

React component for a simple OAuth login with Instagram.

DEMO HERE

button examples

???? Get Started

Follow these steps to start using React Instagram Login:

  1. Installation

    # with npm
    npm i react-instagram-oauth
    
    # with yarn
    yarn add react-instagram-oauth
    
  2. Import and configure component.

    import React from "react";
    import InstagramLogin from "react-instagram-oauth";
    
    export default props => {
      const authHandler = (err, data) => {
        console.log(err, data);
      };
    
      return (
        <InstagramLogin
          authCallback={authHandler}
          appId={CLIENT_ID}
          appSecret={CLIENT_SECRET}
          redirectUri={REDIRECT_URI}
        />
      );
    };
    
  3. Find more info about keys and OAuth apps in Instagram official docs

???? API

Property Type Default Description
authCallback function required Callback function which takes two arguments (error, authData)
appId string required App ID of your OAuth App
appSecret string required App Secret of your OAuth App
redirectUri string required Authorization callback URL of your OAuth App
scopes string[] ["user_profile"] Scopes list. Read more on Permissions page
buttonTheme enum("gradient", "simple", "gradient_short", "simple_short") "gradient" Button style theme
className string "" Custom class name

???? License

MIT

Current Tags

  • 0.0.3                                ...           latest (2 years ago)

3 Versions

  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Total 67
Today 0
This Week 3
This Month 3
Last Day 0
Last Week 0
Last Month 3
Dependencies (0)
None
Dev Dependencies (27)
Dependents (0)
None

Copyright 2014 - 2021 © npmmirror.com |