-
Notifications
You must be signed in to change notification settings - Fork 13
added token expiration alert to coralogix log #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@miakobchuk, please check lib/tokenValidator file with methods for token validation and reuse or modify them |
I did use decodeJwtPayload from existing methods and added a specific one for the task checkTokenExpiration |
| try { | ||
| const payload = decodeJwtPayload(token); | ||
| if (!payload || !payload.exp) { | ||
| return { isValid: false, error: 'Invalid token or no expiration claim' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be no expiration date
| // Mark job as running with TTL to avoid permanent lock on unexpected failures | ||
| await stateMgr.put('running', 'true', { ttl: 3600 }); | ||
|
|
||
| // Check API key expiration once per day |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to have the token expiration as a separate action instead of tacking it on to the check-product-change action? this also eliminate the need to use the state mgr to keep track of when the last time the expiration check was performed.
* [chore] create develop branch from dropin fork (#94) * Remove .d.ts files from deployment (#98) * USF-876: tests events (#96) * adds check for staging to host Signed-off-by: Stephen Rugh <rugh@adobe.com> * Upgrade Checkout and Order confirmation dropins to latest versions (#99) * Upgrade checkout to alpha49 (#100) * Remove copyright from checkout block files * Lint fix * fix flaky cypress (#112) * EDS-406 Auth | Fix auth modal (or point to issue) (#107) * eds-406 fixed problem connect with dialog * eds-406 fixed Lint --------- Co-authored-by: Abrasimov Yaroslav <y.abrasimov@atwix.com> * [chore]: fixing cypress (#116) * Integrate storefront-account and storefront-order dropins (#101) * Move PR to new repo https://github.com/hlxsites/boilerplate-commerce-dropins/pull/108 * Move order initializer logic to dropins.js * eds-400 test new implemetation orderRenderer * eds-400 updated 1 * eds-400 updated template and fixed bugs * eds-300 updated OrderSearch component * eds-400 loop in web version * eds-400 test update error function * eds-400 updated backend path * eds-400 updated backend path * eds-400 updated backend 3 * eds-400 updated backend 4 * eds-400 updated link * updated * updated 2 * updated 3 * updated 4 * FIXED LINT * eds-400 reveted work version * updated 6 * Work variant * eds-400 updated OrderSearch component * eds-400 updated OrderSearch dropin * Minor styling fix * Minor styling fix * Minor styling fix * Fixed bug with render signIn * Added concole.log * updated props * test redirect to account * test commit * test errors event * remove old code * remove old code * updated dropin js * updated * updated * updated Dropin * updated * updated * revert old code * updated form * Updated dropin * updated Dropin * updated dropin * updated dropin * updated * updated * updated * updated * updated * updated * updated * updated * Fixed lint * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * updated * Fix Lint * updated * updated * updated * updated * updated * updated * updated * updated * Fixed Lint * Adjustments for headers * Rollback needless changes * Refactor dropins.js * Fix lint errors * Update versions * Minor adjustment * Update storefront-order build * Update tools version * Update storefront-order version * Minor adjustments after CR * Experiment * Rollback experiment * Adjust order/error handling, remove outdated condition * Testing fix for CustomerDetails * Rollback * Test CustomerDetails update * Test CustomerDetails update 2 * Fix sidebar styling * Drop updated CustomerDetails build * eds-259 updated after CR * eds-259 updated eslint * eds-259 updated dropin js * eds-259 modify functionality dropin js * eds-259 revert default functionality * eds-259 updated dropin js * eds-259 updated dropin js * eds-259 updated order dropin * eds-259 updated order dropin * eds-259 updated order dropin * eds-259 updated order dropin events.on('order/error') * eds-259 updated dropin js * eds-259 updated dropin js redirect * eds-259 updated dropin js redirect added isAccountPage validation * eds-259 updated dropin js redirect * eds-259 removed old code * eds-259 fixed urls - updated order version * Replace URLs with variables * Comment cypress test, leave TODO comment * Change cypress environment * Add cypress placeholders and TODO's * Bump versions * Update storefront-account version * Fix order-header * Refactor routing * Refactor routing 2 * Refactor routing 3 * Adjust header structure * Fix typo * Bump version --------- Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> * fix cypress (#127) * fix cypress * update * chore: fix cypress for ls changed classname (#133) Signed-off-by: Stephen Rugh <rugh@adobe.com> * Fix issue with incorrect order token param (#129) * Fix issue with incorrect order token param * fix cypress --------- Co-authored-by: Devagouda Patil <depatil@adobe.com> Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com> * Update Cart to 0.7.0 (#136) * Update cart beta * Use exact sdk version * revert sdk * Update cart to 0.7.0 * Dropin Build Tools (GraphQl Operations Extensibility) (#106) * build-tools * updated alpha package * latest alpha * nump * Update auth, order and account dropins (#132) * Update auth dropin * eds-416 fixed error date * eds-405 updated auth dropin and fixed bug connect with date * eds-405 updated auth dropin * eds-405 updated auth dropin 3 * eds-405 updated auth dropin 4 * eds-405 updated auth dropin 5 * eds-405 updated auth dropin * eds-405 updated auth dropin * Update auth dropin * Update order dropin * Update account dropin * eds-416 added new account update * eds-416 revert checnges * updates cypress tests to use camelCase as per auth dropin changes Signed-off-by: Stephen Rugh <rugh@adobe.com> * Update auth and account dropins --------- Signed-off-by: Stephen Rugh <rugh@adobe.com> Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> Co-authored-by: Stephen Rugh <rugh@adobe.com> * Moved appending the .appear class to the body until after the LCP is finished to prevent a checkout error from occuring (#140) Co-authored-by: Preston Choate <pchoate@adobe.com> * Franklin -> EDS (#139) Signed-off-by: Stephen Rugh <rugh@adobe.com> * improve product recommendations events (#141) * Cart Container (#142) * refactored to single Block Cart * Update commerce-cart.css * Update commerce-cart.js * wrap in promise all * fixed loading issue * fixed cypress tests * npm audit fixes Signed-off-by: Stephen Rugh <rugh@adobe.com> * fixed layout (#145) * fix merge Signed-off-by: Stephen Rugh <rugh@adobe.com> * Dropins Initializer (#149) * wip initializer poc * initialize cart globally * initialize globally * fixed loop redirect * pdp initializer * await * mountImmediately * bump * fixed lint issues * clean up * bump * Update Cart to 0.8.0 (#151) * Update cart beta * Update use betatwo * update cart to 0.8.0 * Fix 404.html not loading (#156) * sets shopperContext on page load based on user token presence (#153) * adds security scan domain verification tag for boilerplate environment Signed-off-by: Stephen Rugh <rugh@adobe.com> * fix missed merge property not properly updated Signed-off-by: Stephen Rugh <rugh@adobe.com> * fix: set body to display:none initially (#160) Co-authored-by: Stephen <sirugh@users.noreply.github.com> * Integrate Order Cancellation: storefront-order/v0.1.0-alpha15 (#154) * placeholders integration (#166) * placeholders integration * log error * preload and cache placeholders * Update head.html * only initialize event collection when not prerendering (#168) * overloaded adding state caused a2c button to change when wishlist button clicked (#170) * add custom label (#169) * Update Cart to 0.9.0 (#171) * Update cart beta1 * Update to cart 0.9.0 * Update order and account dropins integration (#161) * Update order and account dropins integration * Fix lint issues * Adjust TODO comments * Integrate placeholders approach for static text * Logout redirect fix * Bump storefront-order version * Return details (#163) Implement return-details page * Bump storefront-order version * Update placeholders, remove debug code * Adjust placeholders approach * Adjust placeholders approach (once again) * await initializers (#173) * Placeholder metadata (#175) * Merge PREX bugfix from main into develop (#179) * fixed placeholders (#172) * Fix PRex on cart page (#178) * Fix linting issue --------- Co-authored-by: Carlos A. Cabrera <316104+fnhipster@users.noreply.github.com> Co-authored-by: Mark J. Becker <herzog31@users.noreply.github.com> * fixed PREX (width) layout (#182) * updating experiment plugin (#188) * Checkout drop in version to 0.1.0-alpha53 (#165) * Enable tracking (#190) * Manually update order and account builds * Add tracking support * Update packages * Update package.lock * Experimentation Plugin must load before Drop-ins initialization (#193) * experimentation must load before dropins initialization * Update scripts.js * Remove checkout experimentation block (#200) * Cart Dropin Version 0.10.0 (#201) * Create return page (#204) * Integrate CreateReturn container * Add order build (manually) * Update dependencies * Manually add alpha20 build (test) * Manually add alpha20 build (test) * Install latest version of storefront-order dropin * Install latest order dropin version --------- Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> * USF 1629 - Add coupon container in cart (#162) * Add coupon container in cart * fix lint * Add coupon slot to checkout * Fix lint --------- Co-authored-by: Eric Oeur <31492142+ericeoeur@users.noreply.github.com> * update packages to 0.36.0 (#208) * Checkout drop in version to 0.1.0-alpha57 (#206) * [PDP] add Magento metadata as query parameters instead of headers (#198) * add query parameters instead of headers * add Magento metadata as query parameters instead of headers * fix formating * refactor code as in comments * remove unused import * Build picker --------- Co-authored-by: Mark J. Becker <herzog31@users.noreply.github.com> * Bump storefront-order v0.1.0-alpha23 (#209) * Bump storefront-order v0.1.0-alpha23 * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Bump storefront-order v0.1.0-alpha23 * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * rm unnecessary file --------- Co-authored-by: Sergii Ivashchenko <sivashch@adobe.com> * Extend order initializer logic (#212) * Bump storefront-order v0.1.0-alpha23 * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Order initializer adjustment * Extend order initializer logic * Fix routing bug * Update storefront-order * Fix auth bug --------- Co-authored-by: Elisea Cornejo <ecornejo@adobe.com> Co-authored-by: Sergii Ivashchenko <sivashch@adobe.com> * Bump Checkout drop in version to 0.1.0-alpha58 (#213) * update checkout order handling to include order number in URL (#214) * PDP Containers (#135) * PDP containers * merge * fix * fixed height in overlay * bump * layout * promsie all * fixes * Promise.all * testin w/o promise all * Revert "testin w/o promise all" This reverts commit b3d8faa21a6c2d22f812704e8546eb32922fe827. * update * Update scripts.js * Update product-details.js * test: disable placeholders * Update scripts.js * Update product-details.js * placeholders * moved to variable * settings needs to be set once * Update head.html * extra berak line * promtoe jsonldp * fixed linting issues * initialDat * initialization * set jsonld on lcp * fixes * fix lint * fixed selections * moved initializer * reverting * removed spaces * clean up * optionsUIDs * getOptionsUIDsFromUrl * promise * prefetch placeholders * preload * render concurrently * wip initializer poc * initialize cart globally * initialize globally * fixed loop redirect * pdp initializer * await * mountImmediately * bump * fixed lint issues * clean up * fix lint errors * fixed cypress tests * preloads * preloads * Update product-details.js * valid * Update package.json * updated PDP drop-in version * bug fixes * removed custom pdp * bump * load css first * pre-initialize pdp * preload product image * Update pdp.js * Update pdp.js * Update pdp.js --------- Co-authored-by: Daniela Neagu <danielan@adobe.com> * Preloaders (#218) * Disable bfcache * Update head.html * test w/o recaptcha * moved recaptcha post lcp * Update head.html * Fix import safari (#219) * Disable bfcache * Update scripts.js * Bump Checkout drop in version to 0.1.0-alpha60 (#220) * Redirect to home from order confirmation when signing out and improve checkout layout (#221) * refactor checkAndRedirect function to handle multiple redirections and handle /order-details path * move place order button to main column --------- Co-authored-by: OscarMerino <merino@adobe.com> * Accessibility Fixes (#226) * Disable bfcache * removed uncessary logs * fixed accesibility error * fixed accessibility issues * prex label * Bump order-dropin alpha26 release (#228) * Bump Checkout drop in version to 0.1.0-alpha61 (#225) * USF-1783 - Disable viewport auto-zoom (#230) * Auth VoiceOver (#231) * Auth dropdown WCAG adjustments --------- Co-authored-by: Abrasimov Yaroslav <y.abrasimov@atwix.com> * Fixes non-existing product 404 (#234) * Fix 404 styles (#236) * Add cypress test for cart event - part of USF 1654 (#227) * Add add-to-cart event test * update * Add all required context * chore: recs test against /gear not product (#239) Signed-off-by: Stephen Rugh <rugh@adobe.com> * Auth / Order / Account - 1.0.0 (#242) * Install 1.0.0 version of account dropin * Install 1.0.0 version of order dropin * Install 1.0.0 version of auth dropin * Update cart to v1.0.0-beta1 (#243) * update cart to one beta * [Bugfix]: Shopping Cart View event published too often (#241) * Add manual API call to trigger publishing shopping cart view event * Fix linting issues * Cart version bump * Update cart to beta2 * Bugfix: Update product routing logic to use top level sku --------- Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com> * Checkout v1.0.0 beta1 and Order v1.0.0 beta4 (#235) * Checkout v1.0.0 beta3 (#245) * eds-517 fix bug auth combine modal (#246) Co-authored-by: Yaroslav Abrasimov <y.abrasimov@atwix.com> * Update order, account and auth dropins (#247) * Update order, account and auth dropins * Added Cypress test to check the ACDL place-order event (#249) * Upgrade Checkout and Order dropins to latest versions (#250) * update packages to 0.38.0 (#251) * update auth dropdown navigation (#253) * update auth dropdown navigation * update auth dropdown navigation spec * Package and readme changes for 1.0.0 * bump dropins to 1.0.0* (#261) * bump dropins to 1.0.0 Signed-off-by: Stephen Rugh <rugh@adobe.com> * cart to 1.0.1 Signed-off-by: Stephen Rugh <rugh@adobe.com> --------- Signed-off-by: Stephen Rugh <rugh@adobe.com> --------- Signed-off-by: Stephen Rugh <rugh@adobe.com> Co-authored-by: Mark J. Becker <herzog31@users.noreply.github.com> Co-authored-by: OscarMerino <merino@adobe.com> Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com> Co-authored-by: KostiantynFandeliuk <85105163+KostiantynFandeliuk@users.noreply.github.com> Co-authored-by: Abrasimov Yaroslav <y.abrasimov@atwix.com> Co-authored-by: Konstantin Fandelyuk <k.fandeliuk@atwix.com> Co-authored-by: Daniela Neagu <danielan@adobe.com> Co-authored-by: Devagouda Patil <depatil@adobe.com> Co-authored-by: Chuting (Christina) Yan <59424839+cctina516@users.noreply.github.com> Co-authored-by: Carlos A. Cabrera <316104+fnhipster@users.noreply.github.com> Co-authored-by: Preston Choate <pchoate@adobe.com> Co-authored-by: Dirk Rudolph <drudolph@adobe.com> Co-authored-by: Marc Ginesta <loginesta@gmail.com> Co-authored-by: James Calcaben <jcalcaben@users.noreply.github.com> Co-authored-by: Sergii Ivashchenko <serg.ivashchenko@gmail.com> Co-authored-by: Eric Oeur <31492142+ericeoeur@users.noreply.github.com> Co-authored-by: Anthoula Wojczak <anthoula@users.noreply.github.com> Co-authored-by: Cristian <mitre.cristian@gmail.com> Co-authored-by: eliseacornejo <ecornejo@adobe.com> Co-authored-by: Sergii Ivashchenko <sivashch@adobe.com> Co-authored-by: Emi Pallarès <100593045+emipallares@users.noreply.github.com> Co-authored-by: Natxo Cabré <natxo.cabre@gmail.com> Co-authored-by: Mike <mcocachan@gmail.com>
No description provided.