react-auth-kit
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -21,3 +21,3 @@ import * as React from 'react'; | ||
* | ||
* React Provider that includes React Auth Kit functionility in your React | ||
* React Provider that includes React Auth Kit functionality in your React | ||
* Application. | ||
@@ -30,3 +30,3 @@ * | ||
* | ||
* AuthProvider should be your Top Most element so that if can work effectively | ||
* AuthProvider should be your Topmost element so that it can work effectively | ||
* throughout the application. | ||
@@ -33,0 +33,0 @@ * |
@@ -17,4 +17,4 @@ import * as React from 'react'; | ||
* | ||
* React {@link https://legacy.reactjs.org/docs/higher-order-components.html | HOC} that injects the auth header into | ||
* the class based component props | ||
* React {@link https://legacy.reactjs.org/docs/higher-order-components.html | HCO} that injects the auth header into | ||
* the class-based component props | ||
* | ||
@@ -21,0 +21,0 @@ * **Format: `type token` (authType-space-authToken)** |
@@ -21,5 +21,5 @@ import * as React from 'react'; | ||
* React {@link https://legacy.reactjs.org/docs/higher-order-components.html | HOC} that injects the user state into | ||
* the class based component props | ||
* the class-based component props | ||
* | ||
* If the prop is null then user may be not authenticated. | ||
* If the prop is null then the user may be not authenticated. | ||
* Use `isAuthenticated` to verify | ||
@@ -26,0 +26,0 @@ * |
@@ -16,3 +16,3 @@ import * as React from 'react'; | ||
* React {@link https://legacy.reactjs.org/docs/higher-order-components.html | HOC} that injects | ||
* the authentication state into the class based component props | ||
* the authentication state into the class-based component props | ||
* | ||
@@ -32,3 +32,3 @@ * @example | ||
* | ||
* @param Component - React Class based Component | ||
* @param Component - React class-based Component | ||
* @returns React Higher Order Component with injected `isAuth` prop | ||
@@ -35,0 +35,0 @@ */ |
@@ -29,3 +29,3 @@ import * as React from 'react'; | ||
* React {@link https://legacy.reactjs.org/docs/higher-order-components.html | HOC} that injects | ||
* the `signIn` function into the class based component props. | ||
* the `signIn` function into the class-based component props. | ||
* | ||
@@ -35,7 +35,7 @@ * Call the `signIn` function in the prop | ||
* | ||
* This will authenticate the user by writing the uer state into the mamory | ||
* Also, this will call the rx engine to store the auth into into the storage | ||
* This will authenticate the user by writing the user state into the memory | ||
* Also, this will call the RX engine to store the auth in the storage | ||
* | ||
* @example | ||
* Here is an example without refresh token: | ||
* Here is an example without the refresh token: | ||
* ```jsx | ||
@@ -42,0 +42,0 @@ * class MyComponent extends React.Component { |
@@ -17,3 +17,3 @@ import * as React from 'react'; | ||
* React {@link https://legacy.reactjs.org/docs/higher-order-components.html | HOC} that injects | ||
* the `signOut` function into the class based component props. | ||
* the `signOut` function into the class-based component props. | ||
* | ||
@@ -20,0 +20,0 @@ * Call the `signOut` function in the prop |
@@ -26,3 +26,3 @@ /** | ||
* then `'auth.type auth.token'` is returned. | ||
* If the user is not authenticated, then `null` is ruturned. | ||
* If the user is not authenticated, then `null` is returned. | ||
* | ||
@@ -29,0 +29,0 @@ * @throws AuthError |
@@ -7,9 +7,9 @@ /** | ||
* | ||
* This uses the context data to determine get the user data | ||
* This uses the context data to determine the user data | ||
* | ||
* @typeParam T - Type of User State Object | ||
* | ||
* @returns React Hook with user state functionility. | ||
* @returns React Hook with user state functionality. | ||
* If the user is authenticated, then user data is returned. | ||
* If the user is not authenticated, then `null` is ruturned. | ||
* If the user is not authenticated, then `null` is returned. | ||
* | ||
@@ -20,3 +20,3 @@ * @throws AuthError | ||
* @example | ||
* Here is the example for JavaScript | ||
* Here is the example of JavaScript | ||
* ```js | ||
@@ -32,3 +32,3 @@ * import useAuthUser from 'react-auth-kit/hooks/useAuthUser' | ||
* ``` | ||
* Here is the example for TypeScript | ||
* Here is the example of TypeScript | ||
* ```tsx | ||
@@ -35,0 +35,0 @@ * import useAuthUser from 'react-auth-kit/hooks/useAuthUser' |
@@ -7,8 +7,8 @@ import { signInFunctionParams } from '../types'; | ||
* | ||
* This will authenticate the user by writing the uer state into the mamory | ||
* Also, this will call the rx engine to store the auth into into the storage | ||
* This will authenticate the user by writing the user state into the memory | ||
* Also, this will call the RX engine to store the auth in the storage | ||
* | ||
* @typeParam T - Type of User State Object | ||
* @param signInConfig - Params for sign In | ||
* @returns React Hook with SignIn Functionility | ||
* @returns React Hook with SignIn Functionality | ||
* | ||
@@ -21,3 +21,3 @@ * @throws AuthError | ||
* @example | ||
* Here's a an example without refresh token: | ||
* Here's an example without the refresh token: | ||
* ```jsx | ||
@@ -75,6 +75,6 @@ * import useSignIn from 'react-auth-kit/hooks/useSignIn' | ||
* @remarks | ||
* If you are using refresh token, make sure you add that in the parameter, | ||
* If you are using the refresh token, make sure you add that in the parameter, | ||
* else it throws AuthError | ||
* | ||
* If you are not using refresh token, make sure you don't include | ||
* If you are not using the refresh token, make sure you don't include | ||
* that in the parameter, else it throws AuthError. | ||
@@ -81,0 +81,0 @@ * |
@@ -9,3 +9,3 @@ /** | ||
* | ||
* @returns React Hook with SignOut Functionility | ||
* @returns React Hook with SignOut Functionality | ||
* | ||
@@ -25,4 +25,4 @@ * @example | ||
* @remarks | ||
* For Now, this hook doesn't redirects automatically. | ||
* So one need to writw the redirect logic himself. | ||
* For Now, this hook doesn't redirect automatically. | ||
* So one needs to write the redirect logic himself. | ||
* | ||
@@ -29,0 +29,0 @@ * ```js |
{ | ||
"name": "react-auth-kit", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Authentication Library for React, which makes Token based auth very easy", | ||
@@ -56,8 +56,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"@testing-library/react": "14.0.0", | ||
"@types/jest": "29.5.5", | ||
"@types/js-cookie": "3.0.4", | ||
"@types/node": "20.10.6", | ||
"@types/react": "18.2.28", | ||
"@types/react-dom": "18.2.13", | ||
"@testing-library/react": "14.1.2", | ||
"@types/jest": "29.5.11", | ||
"@types/js-cookie": "3.0.6", | ||
"@types/node": "20.10.7", | ||
"@types/react": "18.2.47", | ||
"@types/react-dom": "18.2.18", | ||
"jest": "29.7.0", | ||
@@ -75,3 +75,3 @@ "jest-environment-jsdom": "^29.4.3", | ||
}, | ||
"gitHead": "9b57cb05933694cb63a96c5e649c55deb18877d9" | ||
"gitHead": "34e30dc123d68e20859e54e479a271123ee0cb59" | ||
} |