Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wwwebman/react-implicit-auth

React Provider handles authorization and authentication using the implicit grant flow of social providers (Google, Facebook).
https://github.com/wwwebman/react-implicit-auth

authentication authorization facebook-api google-api grant-flow implicit-flow react react-context reactjs

Last synced: about 1 month ago
JSON representation

React Provider handles authorization and authentication using the implicit grant flow of social providers (Google, Facebook).

Awesome Lists containing this project

README

        



react-implicit-auth

React Implicit Authorization



npm


bundlephobia


Contributions


License


examples



React Implicit Authorization is a React Provider component that simplifies the [implicit grant flow](https://oauth.net/2/grant-types/implicit/#:~:text=The%20Implicit%20flow%20was%20a,extra%20authorization%20code%20exchange%20step.)
authorization and authentication process using the following social API providers:

- [facebook](https://developers.facebook.com/docs/javascript)
- [google](https://github.com/google/google-api-javascript-client)

Technically it's a wrapper on top of the SDK interface delivered by social providers.

Read [docs](https://react-implicit-auth.webman.pro/) for more details.

[![docs build netlify](https://api.netlify.com/api/v1/badges/5ab989fd-4735-4f4c-a1be-7616fb1dc7ff/deploy-status)](https://app.netlify.com/sites/react-implicit-auth/deploys)

## Install

```bash
$ npm install react-implicit-auth
```

```bash
$ yarn add react-implicit-auth
```

## Motivation

The main idea is to unify the social provides API interface and solve the following problems:

- A different methods naming, API usage, responses.
The component tries to solve issue unifying stuff
- A complex documentation.
Using the component you save time for testing and reading docs
- A lack of auto initialization.
The component allows you to append SDK scripts and initialize them based on the configuration you provide

## Docs

See the documentation for more information about using react-implicit-auth package.

- [ImplicitAuthProvider](https://react-implicit-auth.webman.pro/#implicitauthprovider)
- [Context Methods](https://react-implicit-auth.webman.pro/#methods)
- [useImplicitAuth()](https://react-implicit-auth.webman.pro/#useimplicitauth)

## Troubleshooting

After running yarn start browser complains that "your connection is not secure"?

Ignore it and add an exception for this page.
The page should have `https` to make because most of the providers require it.

Google login doesn't work in incognito mode?

This is one of the limitations of the implicit grant flow.
Google login might not work in incognito mode or when third-party cookies are blocked: [issue](https://developers.google.com/identity/sign-in/web/troubleshooting).

## Contributing

If you want to contribute to react-implicit-auth please see the contributing [guideline](https://github.com/wwwebman/react-implicit-auth/blob/master/CONTRIBUTING.md).