Bearer error - invalid_token - The signature key was not found

前端 未结 4 1355
醉梦人生
醉梦人生 2021-01-12 09:04

I have an Angular 7 application interfacing with a .Net Core 2.2 API back-end. This is interfacing with Azure Active Directory.

On the Angular 7 side, it is authent

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-12 09:30

    My Core API uses different services configuration (and it works :)):

                services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
                .AddJwtBearer(options =>
                {
                    Configuration.Bind("JwtBearer", options);
    

    Are you sure you are passing an access token and not an id_token? Is the aud calim in the token exactly the same as the clientid your API is configured with? You may want to add some events to your options to see what you are receiving and where the validation fails.

提交回复
热议问题