You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of the key strategy for passport makes it hard to rotate the CLAY_ACCESS_TOKEN. For a start, could the key.js strategy fallback to also check a previous token (we'd have to define that all the way through). e.g.
diff --git a/strategies/key.js b/strategies/key.js
index d6b0d23..a74636a 100644
--- a/strategies/key.js
+++ b/strategies/key.js
@@ -10,7 +10,8 @@ const passport = require('passport'),
* @param {function} done
*/
function apiCallback(apikey, done) {
- if (apikey === process.env.CLAY_ACCESS_KEY) {
+ if (apikey === process.env.CLAY_ACCESS_KEY ||
+ apikey === process.env.PREVIOUS_CLAY_ACCESS_KEY) {
// If we're using an API Key then we're assuming the user is
// has admin privileges by defining the auth level in the next line
done(null, { provider: 'apikey', auth: 'admin' });
The text was updated successfully, but these errors were encountered:
elgreg
added a commit
to slategroup/amphora-auth
that referenced
this issue
May 31, 2024
The current implementation of the key strategy for passport makes it hard to rotate the CLAY_ACCESS_TOKEN. For a start, could the key.js strategy fallback to also check a previous token (we'd have to define that all the way through). e.g.
The text was updated successfully, but these errors were encountered: