Skip to content

Conversation

@MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Sep 24, 2023

  • Fix Authentication issues with DeviceFlow

    • Fixes [Bug] Auth - Issue with refresh when no access token #20
    • Fixes [Feature] Auth - Automatically detect if token is still valid for Device Flow #19
    • The Auth module now supports Device Flow for both GitHubApp, OAuthApp, PAT and System PAT.
      • If running Connect-GitHubAccount the flow will do the following:
        • If system tokens are available, use those to log in.
        • Else trigger device flow. Check if access token is valid. if token is valid for less than 4 hours, refresh the token using the device flow refresh token process. Same if access token is expired.
        • If refresh token is expired, trigger new device flow auth process.
        • If type of auth changes due to switchs, trigger new device flow auth process.
      • If running Connect-GitHubAccount -AccessToken is run, an interactive process is assumed. A prompt will ask the user to provide a PAT token, which can be both Fine grained or classic.
    • Changed so tokens are treated as SecureStrings from its stored until its put in the function/command that uses it, and converts it there.
  • Fixes [Feature] Config - Rearchitect how vars are stored #23

    • Configuration is now stored with a prefix that is configured in the SecretVault.psd1 file in the data folder. Default this is "GHPS_". All settings written to the secret store uses this.
  • Adds an API call method Invoke-GitHubAPI to manage all the calls to the GitHub API

    • Includes default usage of settings, like ApiBaseUri, AccessToken (now as a SecureString) and Version for the api version.
    • Supports pagination, in line with Using pagination in the REST API
  • Fixes [Feature] Meta - Get meta information about GitHub #12

    • Adds functions under the Meta namespace.

@MariusStorhaug MariusStorhaug linked an issue Sep 24, 2023 that may be closed by this pull request
@MariusStorhaug MariusStorhaug self-assigned this Sep 25, 2023
@MariusStorhaug MariusStorhaug added the feature New feature label Sep 25, 2023
@MariusStorhaug MariusStorhaug added this to the v0.1 milestone Sep 25, 2023
@MariusStorhaug MariusStorhaug changed the title [Feature] Meta [Feature] Meta - Add the Meta functions Sep 25, 2023
@MariusStorhaug MariusStorhaug marked this pull request as ready for review September 25, 2023 21:25
@MariusStorhaug MariusStorhaug added this pull request to the merge queue Sep 25, 2023
Merged via the queue into main with commit df42207 Sep 25, 2023
@MariusStorhaug MariusStorhaug deleted the 12-feature-meta-get-meta-information-about-github branch September 25, 2023 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment