Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

Allow to set expiry of the oauth token or set higher defaults #1312

Closed

Description

@Haehnchen

The Basic oauth process should be longer then the provided 4 weeks, basically the cli is designed for agents and i dont want the configured agent to run into issues after every 4 weeks.

Current Default

sentry auth login
ℹ Starting authentication...
[...]
✔ Authentication successful!
Token expires in: 4 weeks and 1 day

Workaround

Use api token, with more expire time.

sentry auth login --token=*

Activity

  1. changed the title [-]Allow to set expiry of the auth oauth token or set higher defaults[/-] [+]Allow to set expiry of the oauth token or set higher defaults[/+] on Jul 29, 2026
  2. betegon commented on Jul 29, 2026

    @betegon
    Member

    Hey @Haehnchen!

    from your description, looks like you're getting the token from sentry auth login. That token expires, because it's intended to be used by the CLI internally, and it will be refreshed automatically.

    If you want to us the CLI without the need of logging in and/or in an agent setup that may involve a VM, sandbox or a thing like that, you would need to create a Personal/Organization token from Sentry UI, as we don't have a sentry token command to create them (we'll do in the next release, see getsentry/toolkit#1388).

    To create the token in Sentry's UI:
    Sentry UI -> Settings -> Personal Tokens -> Create new tokens

    by default, tokens don't have an expiration date, so you should be good to go!

  3. Haehnchen commented on Jul 29, 2026

    @Haehnchen
    Author

    and it will be refreshed automatically.

    Thank you, for this info. But it would be nice to reword "Token expires"; its then an "Access Token". Given this it would be clear about the refresh workflow, but you should better completely drop the wording about confusion expiring then.

  4. betegon commented on Jul 30, 2026

    @betegon
    Member

    Agree @Haehnchen , we'll change wording! thanks for the heads up.

  5. added a commit that references this issue on Jul 30, 2026
    26ef23d
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions