32 | If we open a page and it is not logged in, it will
33 | show a full page loader, then when it is fully
34 | rendered, useEffect will run and push to home page.
35 |
36 |
37 | The blocked-unhandled will show the case when not
38 | using full page loader, and it will flash the
39 | content
40 |
41 |
45 | Check out this blog post for explanation
46 |
47 |
68 | Setting up token, if you add token, then you are
69 | considered logged in even in a new tab
70 |
71 |
74 |
77 |
78 |
79 | List of page (using Next.js Link), will authorized
80 | if login (token & no token):
81 |
82 |
83 |
84 | go to /unprotected page (everyone can access
85 | even if not logged in)
86 |
87 |
88 | go to /blocked-unhandled page (will flash
89 | content, try opening a new tab to see more
90 | clearly)
91 |
92 |
93 | go to /blocked page (won't show content if not
94 | authorized)
95 |
96 |
97 | go to /blocked-component page
98 |
99 |
100 |
101 | Try to directly go to (will open a new tab), will
102 | only authorized if using token:
103 |