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
fn get_current_timestamp() -> u64 uses SystemTime::now() to get the current unix timestamp. Unfortunately, SystemTime functions panic on wasm32-unknown-unknown.
In Validation, allow the user to supply a timestamp
/// Supply a custom timestamp for checking `exp` and `nbf` claims./// If `None`, will use `SystemTime::now()`.////// Defaults to `None`.pub current_timestamp:Option<u64>,
As a long-term solution, I prefer option 2 as it adds no cost, doesn't inflate the dependency tree, and allows for better customization.