ngx-rocket / generator-ngx-rocket

:rocket: Extensible Angular 14+ enterprise-grade project generator
https://ngx-rocket.github.io/
MIT License
1.53k stars 217 forks source link

Extract credentials from authentication service #447

Closed sinedied closed 5 years ago

sinedied commented 5 years ago

The current authentication services/helpers and its potential link with HttpService is a source of confusion that can lead to unintuitive errors like this https://github.com/ngx-rocket/generator-ngx-rocket/issues/436 and https://github.com/ngx-rocket/generator-ngx-rocket/issues/432

I suggest to extract the credentials part in a separate service, so that circular dependencies issues are avoided if anyone adds HttpService in the AuthenticationService and use the credentials in an interceptor, which is to me a basic use case.