BC: if key is set to token, the new tokenKey default will overwrite it
See original GitHub issueI realize this is very nit-picky.
Commit 9cf6a15c03948fd7b415bfa8d0c7946020b6100b adds a tokenKey that writes the raw token to the key specified. This’ll break backwards compatibility if the “key” preference is set to ‘token’ like this:
const jwt = require('koa-jwt');
jwt({ key: 'token'});
In that case, the value at token will be the user variable in versions <=1.2.0 but the raw string token in 1.3.0 >=.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8
Top Results From Across the Web
Solved: Re: Initialize Token As Default Values Then Insert...
Hi guys, currently i facing an issues which need initialize my token as any value 1st. However the token values will change when...
Read more >pyhocon/config_tree.py at master - GitHub
if key is in both a and b and both values are dictionary then merge it otherwise override it. if key in a...
Read more >Default Tokens With a Values Replace It When New Values ...
currently i facing an issues which need initialize my token as any value 1st. However the token values will change when a new...
Read more >Usage Notes - IBM
To override the encryption algorithm marks of the KEK, supply a valid token in the target_key_identifier field of the same key type being...
Read more >Cisco IOS Security Command Reference: Commands A to C
The aaa authentication token key command can be used only if the aaa new-model command is configured. You must configure the user account ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No problem!
opts.tokenKey
support was only in the wild for a few days so there will be few if any users relying on that functionality. Plus the fix for those users (adding{ tokenKey: 'token' }
) is trivial, whereas both identifying the problem and fixing it without this PR for users like you, who are expectingctx.state.token
not to be touched, is more difficult. I can push this to npm as a patch release later today.Published as v2.2.1