UNET API - v0.0.0
    Preparing search index...

    Function verifyAccessToken

    • For your backend (or anywhere without a UnetId instance): checks an access token the browser sent you and returns who it belongs to. Never trust a client-sent sub alone. Resolves null when the token is invalid/expired/revoked. Works in Node 18+ (global fetch).

      Parameters

      • accessToken: string
      • options: {
            issuer?: string;
            fetch?: {
                (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
                (input: string | URL | Request, init?: RequestInit): Promise<Response>;
            };
        } = {}
        • Optionalissuer?: string
        • Optionalfetch?: {
              (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
              (input: string | URL | Request, init?: RequestInit): Promise<Response>;
          }

      Returns Promise<UnetUser | null>