1.0.7 • Published 4 years ago

react-figma-login v1.0.7

Weekly downloads
6
License
MIT
Repository
github
Last release
4 years ago

react-figma-login

npm npm bundle size npm

React component for a simple OAuth login with Figma.

DEMO HERE

image

🚀 Get Started

Follow these steps to start using React Figma Login:

  1. Installation

    # with npm
    npm i react-figma-login
    
    # with yarn
    yarn add react-figma-login
  2. Import and configure component.

    import React from "react";
    import FigmaLogin from "react-figma-login";
    
    export default props => {
      const authHandler = (err, data) => {
        console.log(err, data);
      };
    
      return (
        <FigmaLogin
          authCallback={authHandler}
          clientId={CLIENT_ID}
          clientSecret={CLIENT_SECRET}
          redirectUri={REDIRECT_URI}
          scope={SCOPE}
        />
      );
    };
  3. Find more info about keys and OAuth apps in Figma official docs

📖 API

PropertyTypeDefaultDescription
authCallbackfunctionrequiredCallback function which takes two arguments (error, authData)
clientIdstringrequiredClient ID of your OAuth App
clientSecretstringrequiredClient Secret of your OAuth App
redirectUristringrequiredAuthorization callback URL of your OAuth App
scopestringrequiredScope that will be requested. For now only "file_read" is available.
buttonThemeenum("light", "light_short", "dark", "dark_short")"light"Button style theme that based on Figma styles
classNamestring""Custom class name

📝 License

MIT

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.0

4 years ago