Let's code: Authentication in Angular #2 : Auth service

Introduction This is part two of Authentication in Angular series. This one is about building authentication part to handle OAuth calls for us. You can find first post here: https://benetis.me/posts/angular-authentication/ We will be using redux with our angular project to help us handle side effects. https://github.com/ngrx/store Our setup - angular-cli 1.0 + Angular4 (Angular 4.1) Aims After user clicks login - we need to call OAuth endpoint to get access and refresh tokens which we will store in local storage Show errors for user We want to store tokens in our redux store so they are easily accessible and can be added as headers to our api requests Login Ah, the login....

May 10, 2017 · 7 min · 1357 words · Me