Getting `unauthorized_client` error while introspecting token from NestJS API
Hello everyone
I'm trying to implement authentication via Zitadel on a NestJS REST API, like on this example repo. On the Zitadel side, I have a project with two apps:
- one with āAPIā type, with JWT private key authentication (dedicated to the NestJS API)
- one with āUser Agentā type, with PKCE authentication (so that a user can retrieve an access token).
With a client like Postman, I'm able to fetch a user access token via āAuthentication Codeā grant type and the/oauth/v2/authorizeand/oauth/v2/tokenendpoints. When calling a NestJS API endpoint protected by Zitadel authentication, the call to the introspection endpoint made in thestrategy.jsfile of thepassport-zitadellibrary receives a 400 Bad Request, indicating āunauthorized_clientā. Any ideas?