Using an Angular service for OAuth2 authentication and authorization