Set JWT Config
At present, JWTuses a dummy backend call, so we don't need any secret, but in actual implementation, you need to set a secret in the following file. For more detail refer to JWT here: https://jwt.io/introductionarrow-up-right
... REACT_APP_JWT_SECRET_KEY= REACT_APP_JWT_TIMEOUT= ...
Change AuthProvider
import { JWTProvider as AuthProvider } from 'contexts/JWTContext';
Change auth Hooks
Comment another context in the following file and uncomment JWT one.
import AuthContext from 'contexts/JWTContext';
It's also super simple. We have provided a code that just needs to be replaced.
From: src\sections\auth\login\JWTLogin
src\sections\auth\login\JWTLogin
To: src\sections\auth\auth-forms\AuthLogin.js
src\sections\auth\auth-forms\AuthLogin.js
We have provided a code that just needs to be replaced.
From: src\sections\auth\register\JWTRegister
src\sections\auth\register\JWTRegister
To: src\sections\auth\auth-forms\AuthRegister.js
src\sections\auth\auth-forms\AuthRegister.js
Last updated 6 months ago