https://github.com/r17x/react-auth
🚧 Unpublished/Undistributed - Still Work in Progress
https://github.com/r17x/react-auth
client javascript jwt nodejs server
Last synced: 9 months ago
JSON representation
🚧 Unpublished/Undistributed - Still Work in Progress
- Host: GitHub
- URL: https://github.com/r17x/react-auth
- Owner: r17x
- Created: 2022-07-02T20:25:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-17T16:43:39.000Z (over 3 years ago)
- Last Synced: 2025-03-31T13:28:25.264Z (10 months ago)
- Topics: client, javascript, jwt, nodejs, server
- Language: JavaScript
- Homepage:
- Size: 127 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Feature
* JWT Support
# Usage
## Install
### Yarn
```console
yarn add react-auths
```
### NPM
```console
npm install --save react-auths
```
### Register `Provider`
```javascript
// file: index.js
import { AuthProvider } from 'react-auths'
export default function EntryPoint(){
return (
...
)
}
```
### Consume `Auth` states or actions
```javascript
import { useAuth } from 'react-auths'
const Login = () => {
const { signIn } = useAuth()
const token = 'accessToken'
return (
signIn(token) } />
)
}
```
# API