Skip to content

Instantly share code, notes, and snippets.

@jweaver
jweaver / disable-plantuml-code-prompt_org-mode.el
Last active March 31, 2022 10:49
Disable the prompt during org-mode export to execute code blocks for plantuml
;; Disable every prompt during an org-mode export, when using plantuml.
;; Useful when you have multiple UML diagrams in an org doc, and you don't
;; want to type 'y' on every export prompt.
(defun my-org-confirm-babel-evaluate (lang body)
(not (string= lang "plantuml")))
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
@soulmachine
soulmachine / jwt-expiration.md
Last active June 21, 2024 14:09
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC: