waiting-for-dev / warden-jwt_auth

JWT token authentication with warden
MIT License
113 stars 56 forks source link

"No verification key available" because `decoding_secret` is nil #44

Closed lauramosher closed 2 years ago

lauramosher commented 2 years ago

Please, for a bug report fill in the following template. Before that, make sure to read the whole README.

Feature requests and questions about warden-jwt_auth are also accepted.

Expected behavior

decoding_secret to correctly default to secret on configuration per the README stating that decoding_secret only need to be set if using an asymmetric algorithm; and devise jwt / token decoding works as expected

Actual behavior

decoding_secret is nil; devise jwt / token decoding does not work and returns "No verification key available"

Steps to Reproduce the Problem

  1. Sign in and get JWT token from dispatch
  2. Use token on authenticated route OR run Warden::JWTAuth::TokenDecoder.new.call(<TOKEN>)
  3. Note: "No verification key available" OR JWT::DecodeError (No verification key available) is returned

Debugging information

Provide following information. Please, format pasted output as code. Feel free to remove the secret key value.

waiting-for-dev commented 2 years ago

That's unfortunate. I'll work on it as soon as possible. Feel free to submit a fix.

lauramosher commented 2 years ago

@waiting-for-dev After further testing, this actually looks like an issue with devise-jwt and how it yields configuration to this gem.

I'll close this one out and open it on the proper repo!