Skip to content

Instantly share code, notes, and snippets.

View pmchung's full-sized avatar

Philip Chung pmchung

View GitHub Profile
@pmchung
pmchung / private_fork.md
Created December 28, 2025 22:18 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@pmchung
pmchung / jwt-expiration.md
Created January 9, 2025 12:03 — forked from soulmachine/jwt-expiration.md
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:

Directive Priority
--------------- -----------
ng-switch 1200
ng-non-bindable 1000
ng-repeat 1000
ng-if 600
ng-controller 500
ng-init 450
ng-include 400
ng-checked 100