Verifying Auth0 JWT throws invalid algorigthm

前端 未结 4 2759
说谎
说谎 2021-02-20 17:38

I have created an Auth0 client, I am logging in and receive this token:

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1rVkdOa1l5T1VaQ1JqTkRSVE5EUmtNeU5rVkROMEUyU         


        
4条回答
  •  感情败类
    2021-02-20 18:09

    You need to change the third parameter of your verify method which is

    {algorithm: 'RS256'} to ==>{algorithms: 'RS256'}
    

    and make sure you write the correct name for the algorithm, It will work fine

提交回复
热议问题