Closed panjenny0 closed 3 years ago
@panjenny0 By "functionality included" does that mean it should log the user out of their session? If so, is this blocked by the auth tasks?
@kevin-zou Good question! Yea it means logging the user out of their current session. I think this is technically blocked by both the auth task and the routing. I will have a PR for routing done either today or tomorrow so maybe to get started, you could just do the router part and once the auth is done, you can add the sign out on firebase :) How it was done in the CMS was something like
await firebase.auth().signOut();
router.push('/');
in https://github.com/nwplus/CMS-V2/blob/master/pages/index.js
the above router
is from useRouter
in next/router
(from next.js), but since we're not using next.js, maybe you can look into https://reactrouter.com/web/api/Hooks (somethng like useHistory
)
EDIT
wait I just realized we use wouter
lmao docs here https://github.com/molefrog/wouter
closed by #184
184?
184?
I saw the logout button had been added, maybe this wasn't added in #184 but it worked in that PR
oh haha Allison did it with Dan in a different PR
oh haha Allison did it with Dan in a different PR
Oh HAHA okay nice whoops my bad 😬 good job Dan!!
no our bad for forgetting to attach the pr here! ty
HEADS UP, logging out redirects back to dashboard because there are dashboard features a logged out user can use