Skip to content

decodeJwtExpiryEpochSeconds — @gj-kit/expo-auth

A public function from @gj-kit/expo-auth. The signature below is taken directly from the 0.1.1 release declaration.

import { decodeJwtExpiryEpochSeconds } from '@gj-kit/expo-auth';
/**
* ⚠ **This is a payload decode WITHOUT signature verification.** It base64url-decodes the
* payload and reads the `exp` claim; it guarantees nothing about the token's authenticity or
* integrity. It exists solely as a proactive-refresh scheduling hint — never use it for
* authorization decisions or as a trust boundary. The worst a forged `exp` can cause is a
* mistimed refresh, and the reactive 401 path is the safety net for that (§7-1).
*
* Corrupt or non-JWT input returns `null` without throwing (H13).
*/
declare function decodeJwtExpiryEpochSeconds(token: string): number | null;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/expo-auth
  • Version: 0.1.1
  • Public entry: .
  • Source: GitHub