Getting error: "invalid_client" when connecting Angular to IndentityServer4

I am getting invalid_client error when connecting Angular to IndentityServer4

Everything is okay when triggering it using Postman as shown below.

enter image description here

And this is how my Angular authservice connect to IdentityServer4. (shown below)

It will give me invalid_client error.

Is there anything I'm doing wrong or have missed?

enter image description here

Upvotes: 0

Views: 192

Answers (1)

Aviad P.
Aviad P.

Reputation: 32639

HttpParams is immutable (see: HttpParams)

So you have to do this instead:

const body = new HttpParams()
   .set(...)
   .set(...)
   ...;

Upvotes: 3

Related Questions