I'm start learning and implementing an authorization / authentication on my simple SPA using Angular 8 as my client web app. I use the oidc-client-js
library for my client and identityserver4
for my STS. I'm following the sample provided of oidc-client-js on github. In the said example, it uses Implicit
flow but, upon reading to other blogs and forums, they encouraging you to use code
flow with Pkce
instead, which I'm trying to implement now. Below are my implementation codes.
Now, my problem is that, when I click the Login
link on my client web app, I'm receiving the below error.
But, when I reverted it to Implicit
flow, I can successfully login to my web app without any issue.
Can someone guide me on how do I implement the code
flow with Pkce
?
Many thanks in advance!