Relative Content

Tag Archive for angularjwtauthorizationprimeng

Login User Data Persistent

I’m not understanding what I’m doing wrong in this implementation. So I’m logging in and passing the correct credentials for a user. After submitting the credentials it will call the server to validate the user creds. Once it is valid it will spit back out a JWT Token, a refresh token, and isLoggedIn variable true. In theory and from what I understand in the current code I have written, it should save the isLoggedIn variable to true in localStorage (Not the best but that is not the current issue). The button that displays Login should be switched to Logout, but it is not happening, and I do not understand why. I get the JWT token and refresh token with no problems. It is now to have the user be persistent that it is logged in.