Originally published on my blog.
TL;DR
In this tutorial, I'm going to show you how to build a simple web app that handles authenticat...
For further actions, you may consider blocking this person and/or reporting abuse
Thanks a lot for this tutorial! I am just going through it. There is a small typo in the go sample for generating the verification signature. The variable on the last line should be 'b' instead of 'a'.
Thank you, I'm glad it was useful to you!
Thanks for the heads up, I updated the post 👍
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? BecauseCanActivateViaAuthGuardlooks forisAuthenticatedandisAuthenticatedis just looking for thelocalStorageitem is set or not. Am I true in this point of view or do I miss something?I think the func account should be spliting by points and not by spaces at
authArr := strings.Split(authToken, " ")
Also, I believe the expected value for len(authArr) should be 3.
This was really helpful and informative. I like how you care about explaining the little details. Thank you!
Hey Ali,
Thank you, I'm so glad this was helpful!
I would like to implement a refresh token, that active when the token finished,
I think that I should include in the AuthInterceptorService. Thank you very much in advance.