DEV Community

Discussion on: JWT authentication in an Angular application with a Go backend

Collapse
 
gnyblast profile image
Güney Saramali

Hey, first of all, thanks for your nice post about this topic which is one of the cleanest article on the internet about GoLang + Angular auth. But theres one stuff I'd like to ask. If I set localStorage.setItem('token','something') then I'll have access to the auth reqiured page on the front-end right? Ok the GoLang back-end still verifies the JWT token and won't return any database related or If you using the GoLang back-end as a file server maybe, it won't return any file but still I'll be able to get into the auth required front-end page and see some content that is getting generated by Angular right? Because CanActivateViaAuthGuard looks for isAuthenticated and isAuthenticated is just looking for the localStorage item is set or not. Am I true in this point of view or do I miss something?