26 Jan 2020
cat: Angular 2+, API
0 Comments

Laravel API and Angular Client Tutorial – Part 2 Client OAuth Login

In this tutorial we will create an Angular application that will authenticate to a Laravel OAuth server. We will use the authorization code with PKCE flow since the Angular application is an SPA or Single-page-application. In SPAs we can't store the client secret since it will be visible in the browser. So we are going to write the codes that will generate the correct login URL and redirect to it. After logging in to that URL the OAuth server will redirect back to our app where we can get an access token that we can use to request protected resources.
10 Jan 2020
cat: Angular 2+
4 Comments

Angular 8 OAuth 2 Authorization Code Flow with PKCE

Introduction In this tutorial we will create an Angular application that authenticates using Authorization Code flow with PKCE. PKCE stands for Public Key Code Exchange and is useful authentication code flow when you know it is not safe for the app to store the client secret such as SPAs (Single Page Apps). Setup To generate  … Read more