1.3.0 • Published 1 year ago
@crowdin/react-crowdin-login v1.3.0
React Crowdin Login
React component for a simple OAuth login with Crowdin.
Get Started
Follow these steps to start using React Crowdin Login:
- Installation
# with npm
npm i @crowdin/react-crowdin-login
# with yarn
yarn add @crowdin/react-crowdin-login
- 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}
/>
);
};
- Find more info about keys and OAuth apps in official docs ― Creating an OAuth App
API
Property | Type | Default | Description |
---|---|---|---|
authCallback | function | required | Callback function which takes two arguments (error, authData) |
clientId | string | required | Client ID of your OAuth App |
clientSecret | string | required | Client Secret of your OAuth App |
redirectUri | string | required | Authorization callback URL of your OAuth App |
scope | string | required | Scope that will be requested. Understanding Scopes for OAuth Apps |
buttonTheme | enum: "light" , "light_short" , "dark" , "dark_short" | "light" | Button style theme, that based on Login Branding Guidelines |
className | string | "" | Custom class name |
Contribution
We are happy to accept contributions to the React Crowdin Login. To contribute please do the following:
- Fork the repository on GitHub.
- Decide which code you want to submit. Commit your changes and push to the new branch.
- Ensure that your code adheres to standard conventions, as used in the rest of the library.
- 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)