Auth0 Home Blog Docs

WebAPI 2 QuickStart sample not compatible with WebAPI 2 (.NET 4.6.1)

owin
webapi

#1

I have existing WebAPI project with .NET framework 4.6.1

Trying to setup Auth0 by following through QuickStart https://manage.auth0.com/#/applications/maSXtxq0pWJZU9UgITR7khaBOmtrNPxW/quickstart

However, this example does not seem to be compatible with latest versions of packages

Microsoft.Owin.Security.Jwt (runtime version v4.0.30319, version 4.0.30319)
Auth0.OpenIdConnectSigningKeyResolver (runtime version v4.0.30319, version 4.0.0.0)

The problem seems to be that the signature of IssuerSigningKeyResolver has been changed - specifically the ‘identifier’ parameter is no longer of type SecurityKeyIdentifier, but instead a string…so the following does not work:

...
IssuerSigningKeyResolver = (token, securityToken, identifier, parameters) => keyResolver.GetSigningKey(identifier)
...

Is there an up to date example?


#2

A post was merged into an existing topic: OWIN Web Auth Identifier Bug


#3