tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.29k stars 1.54k forks source link

setSecret not updating $config #2215

Open salmanalee opened 1 year ago

salmanalee commented 1 year ago

If you are using multiple secrets and you were previously using setSecret(), it has stopped working. setSecret method should also update existing $config->signingKey.

https://github.com/tymondesigns/jwt-auth/commit/e232940cd26e01c117ea37198013845db5e5314d#diff-38952bbf39362840adfc497a8b590ee232d2c5812c9eb340220159eb42463590L73

Previously, it was using payload keys so updating $secret was working

https://github.com/tymondesigns/jwt-auth/commit/e232940cd26e01c117ea37198013845db5e5314d#diff-38952bbf39362840adfc497a8b590ee232d2c5812c9eb340220159eb42463590L73

Expected Behaviour: When calling setSecret, it should update $config->signingKey also or there should be a way to call buildConfig from