About the login step at Angular 6:
If I did it as the following:
- Send username and password to PHP;
- Server code check user if exists;
- If really exists, we will send a json array again to Angular containing
username
anduser role
- Save them in localstorage
- And when user try to navigate through the app, we will check these credentials using
canActivate
guard service.
Do we need to use JWT too to set a token or isn't necessary ?