1.2.4 • Published 5 years ago

@gabrielgvl/jwt_auth_react v1.2.4

Weekly downloads
26
License
MIT
Repository
-
Last release
5 years ago

Jwt Auth

Usage example

  • Provider

  • Wrap your application with the provider

ReactDOM.render(
      <JwtAuthProvider keyPrefix="YOUR APP KEY">
          <App />
      </JwtAuthProvider>,
  document.getElementById('root'),
);
  • Hooks
import useJwtAuth from '@gabrielgvl/jwt_auth_react';

const MyComponent = () => {
  const { handleLogin, logIn, logOut, userInfo } = useJwtAuth();
}
  • logIn(token) - Passes response jwt token to storage
  • logOut() - Remove token from storage
  • isLoggedIn - Check if token is in storage
  • userInfo - Retrieves decoded user info from token
1.2.4

5 years ago

1.2.3

5 years ago

1.2.21

5 years ago

1.2.2

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.2.1

5 years ago

1.2.12

5 years ago

1.2.11

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.0

5 years ago

0.1.6

5 years ago

0.1.4

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago