com.auth0.IdentityVerificationException:交换Auth0令牌的授权码时发生错误

com.auth0.IdentityVerificationException:交换Auth0令牌的授权码时发生错误

问题描述:

我正在尝试在基于maven的非常基本的spring-boot-application中实现auth0.这是我得到的错误:

I am trying to implement auth0 in a very basic spring-boot-application based on maven. This is the error that I get:

com.auth0.IdentityVerificationException:交换Auth0令牌的授权代码时发生错误

com.auth0.IdentityVerificationException: An error occurred while exchanging the Authorization Code for Auth0 Tokens

运行原始教程项目时,一切正常.该错误仅在我的自定义应用程序中发生.基本上,我将所有文件从教程项目复制到了我的应用程序中.尽管如此,我还是遇到了这个错误...

When running the original tutorial-project everything works fine. The error occurs only in my custom application. Basically I copied all the files from the tutorial-project into my application. Nevertheless I run into this error...

再进一步,我看到一个异常

further down the exception I see a

com.auth0.exception.APIException:请求失败,状态码为401:未经授权

com.auth0.exception.APIException: Request failed with status code 401: Unauthorized

已解决:

客户秘密是错误的.客户端机密末尾实际上有一个空格,我不小心删除了该空格.哇.

The client-secret was wrong. Actually there is a space at the end of my client-secret, which I accidentally removed. Wow.