【问题标题】:Getting error: "invalid_client" when connecting Angular to IndentityServer4将 Angular 连接到 IndentityServer4 时出现错误:“invalid_client”
【发布时间】:2021-09-26 23:42:13
【问题描述】:

将 Angular 连接到 IndentityServer4 时出现 invalid_client 错误

如下所示,使用 Postman 触发时一切正常。

这就是我的 Angular authservice 连接到 IdentityServer4 的方式。 (如下图)

它会给我 invalid_client 错误。

我做错了什么或错过了什么?

【问题讨论】:

    标签: angular asp.net-core identityserver4


    【解决方案1】:

    HttpParams 是不可变的(参见:HttpParams

    所以你必须这样做:

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

    【讨论】:

    • 天哪,你是救生员。一直在寻找这个几个小时。非常感谢。
    猜你喜欢
    • 2020-04-04
    • 2020-08-22
    • 2019-06-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多