User Context (#51)
* feat(frontend): user Context / useUser hook Adds a UserContext to wrap the app and load/cache the user when the website renders. Also adds the useUser hook to pull in user data anywhere its needed on the site. This commit also adds redirection to the login page for users who are not signed in * fix(frontend): use process.env.PORT for user request on server side (defaults to 3000) * docs(frontend): added documentation/notes for how the user context/login works
This commit is contained in:
@@ -35,6 +35,7 @@ app
|
||||
// Setup sessions
|
||||
const sessionRespository = getRepository(Session);
|
||||
server.use(
|
||||
'/api',
|
||||
session({
|
||||
secret: 'verysecret',
|
||||
resave: false,
|
||||
|
||||
Reference in New Issue
Block a user