Skip to content

svaraborut/reactit-auth

Repository files navigation

🔒 @reactit/auth

Ultimate token authentication solution for your React project.

This library aims to be the less opinionated and more versatile React authentication solution. The solution autonomously handles the tokens, their storage and expiration, user should provide any behavioural logic to retrieve/generate the tokens and insert them in their intended usage configuration (todo Cookies).

Api

The API documentation is available here

Examples

We suggest getting familiar with the library API as the examples cannot cover all the possible scenarios, but here are covered the more common use cases for this handy React library. In this example axios is used as the HTTP client for any AJAX requests but nothing prevents you from using any client you may think of (also exotic connections suc WebSockets can work)

Alternatives

Requested features

  • ✔️ Fix first cycle bug
  • Add redirect on logout
  • Add redirect after login
  • Add more examples
  • Create preconfigured AuthProviders

About

Ultimate token authentication for React

Resources

Stars

Watchers

Forks

Packages

No packages published