Skip to content

Add a token refresh example for auth.refreshToken #1

Description

@TDanks2000

Background

The wrapper supports OAuth authorization-code flow, device-code flow, and token refresh. The README and examples show sign-in flows, but a short refresh-token example would help apps keep Trakt sessions alive without making users sign in again.

Proposed change

Add a concise example showing trakt.auth.refreshToken and trakt.setAccessToken, with a note that apps should persist the returned refresh token securely.

Acceptance criteria

  • docs/examples.md includes a token refresh example.
  • The example uses the existing auth.refreshToken method.
  • The wording does not recommend storing tokens in client-side source code.
  • bun run verify passes.

Files likely involved

  • docs/examples.md
  • README.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions