fix(auth status): better output for auth status

Description

Improvements to glab auth status to make it less confusing for the user:

  • gives a warning when a user has a token set via an env variable (1password plugin uses an env variable)
  • improve error messages
  • oauth tokens no longer get flagged as invalid

Related Issues

Resolves # #1275 (closed)

How has this been tested?

Scenario Change Screenshot
With env var set new warning Screenshot_2024-05-21_at_17.46.07
Oauth token Now not displayed as invalid Screenshot 2024-05-21 at 17.34.38.png
Invalid token in config now says in configuration file Screenshot 2024-05-21 at 17.33.18.png
No token in config now says in configuration file Screenshot 2024-05-21 at 17.33.35.png

Invalid token set as env variable (multiple instances) Screenshot_2024-05-21_at_16.26.03

In the above examples i am using an oauth token for gitlab, which now isn't flagged as invalid.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Jay McCure

Merge request reports

Loading