I want to have multiple secret keys for better security (related to https://github.com/codecasts/laravel-jwt/issues/25).
In my application each tenant have a secret key saved in the database, so I need a way to change the key set in Codecasts\Auth\JWT\Token\Manager.
I tried to change the config inside a middleware:
Config::set('jwt.secret', $tenant->jwt_secret);
but the Manager is initialized before the middleware runs, so the change is irrelevant.
I need a way to change the key in the config before the Manager is initialized or a way to change the key afterwards.
I want to have multiple secret keys for better security (related to https://github.com/codecasts/laravel-jwt/issues/25). In my application each tenant have a secret key saved in the database, so I need a way to change the key set in
Codecasts\Auth\JWT\Token\Manager
.I tried to change the config inside a middleware:
but the Manager is initialized before the middleware runs, so the change is irrelevant.
I need a way to change the key in the config before the Manager is initialized or a way to change the key afterwards.