Generate Token through Auth0
This commit is contained in:
10
front/src/components/RequireAuth.tsx
Normal file
10
front/src/components/RequireAuth.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import AuthService from '../hooks/AuthenticationHooks';
|
||||
|
||||
function RequireAuth({ children }: { children: JSX.Element }): JSX.Element {
|
||||
const { redirectIfNotLoggedIn } = AuthService;
|
||||
redirectIfNotLoggedIn();
|
||||
|
||||
return children;
|
||||
}
|
||||
|
||||
export default RequireAuth;
|
||||
Reference in New Issue
Block a user