Lab8 report - scvnq/demo1 GitHub Wiki
Lab8
Students Information
Tiancheng Xie , ID:25
Chen Sun , ID:23
Goal:
Perform User Authentication with Email and Password using JWT token.
Home.html
Create the token:
Check header or url parameters or post parameters for token,then decode the token.If token has decoded .next call next() so that respective route is called.
Result:
Home page:
On click of button validate the token and return the payload.
Conclusion:
Through experiments, I know that token stored in the cookie, according to the traditional cross-domain scheme, sharing/passing token in the cookie.If token is stored in localStorage, a cross-domain scheme of localStorage is required to share/transfer token in cookie. The cross-domain scheme of localStorage can be searched, and there is an open source class library.