question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BC: if key is set to token, the new tokenKey default will overwrite it

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
sddcommented, Jan 24, 2017

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 expecting ctx.state.token not to be touched, is more difficult. I can push this to npm as a patch release later today.

0reactions
sddcommented, Jan 24, 2017

Published as v2.2.1

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found