1.3.0 • Published 1 year ago

@crowdin/react-crowdin-login v1.3.0

Weekly downloads
6
License
MIT
Repository
-
Last release
1 year ago

React Crowdin Login

npm npm npm bundle size GitHub issues

React component for a simple OAuth login with Crowdin.

DEMO HERE

light border lowerc short light border lowerc dark border lowerc short dark border lowerc

Get Started

Follow these steps to start using React Crowdin Login:

  1. Installation
# with npm
npm i @crowdin/react-crowdin-login

# with yarn
yarn add @crowdin/react-crowdin-login
  1. Import and configure component.
import React from "react";
import CrowdinLogin from "@crowdin/react-crowdin-login";

export default props => {
  const authHandler = (err, data) => {
    console.log(err, data);
  };

  return (
    <CrowdinLogin
      authCallback={authHandler}
      clientId={CLIENT_ID}
      clientSecret={CLIENT_SECRET}
      redirectUri={REDIRECT_URI}
      scope={SCOPE}
    />
  );
};
  1. Find more info about keys and OAuth apps in official docs ― Creating an OAuth App

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. Understanding Scopes for OAuth Apps
buttonThemeenum: "light", "light_short", "dark", "dark_short""light"Button style theme, that based on Login Branding Guidelines
classNamestring""Custom class name

Contribution

We are happy to accept contributions to the React Crowdin Login. To contribute please do the following:

  1. Fork the repository on GitHub.
  2. Decide which code you want to submit. Commit your changes and push to the new branch.
  3. Ensure that your code adheres to standard conventions, as used in the rest of the library.
  4. Submit a pull request with your patch on Github.

Seeking Assistance

If you find any problems or would like to suggest a feature, please feel free to file an issue on Github at Issues Page.

Need help working with React Crowdin Login or have any questions? Contact Customer Success Service.

Author

  • Alexandr Tovmach (alexandrtovmach@gmail.com)

License

1.3.0

1 year ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago