jeudi 29 avril 2021

how can i use .verify in verifying jwt token instead of .decode method in rails?

    def self.decode(token)
    decoded = JWT.decode(token, SECRET_KEY, true)
    HashWithIndifferentAccess.new decoded
    end

I am using the .decode method here to decode the key, when I use .verify instead of .decode it gives me an "undefined method 'verify'" error.

Aucun commentaire:

Enregistrer un commentaire