Commit 1aa420a1 authored by Stan Hu's avatar Stan Hu

Add typ header back into JWT payload

ruby-jwt v2.0 removed the `typ` header in
https://github.com/jwt/ruby-jwt/commit/cc41d53e00f8cbf015271b53f5ad761bd6ac2312.

To ensure tokens don't get marked invalid during an upgrade,
add it back to ensure backwards compatibility.
parent 3648e280
......@@ -18,7 +18,7 @@ module JSONWebToken
end
def encoded
JWT.encode(payload, secret, JWT_ALGORITHM)
JWT.encode(payload, secret, JWT_ALGORITHM, { typ: 'JWT' })
end
private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment