Verifying Auth0 JWT throws invalid algorigthm

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

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

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1rVkdOa1l5T1VaQ1JqTkRSVE5EUmtNeU5rVkROMEUyU         


        
4条回答
  •  醉酒成梦
    2021-02-20 17:50

    You need to specify the allowed algorithms as an Array of Strings, instead of an algorithm String.

    jwt.verify(token, MYSECRET, { algorithms: ['RS256'] });
    

提交回复
热议问题