Issue:
Currently ego token is stored in browser's local storage which may be vulnerable as is readable by any Javascript code that runs on the site.
Solution:
- Store ego token as session cookie, which is readably only by the server.
- Make use of
next-auth library