# README
Auth package
The CLI authentication follows this approach:
$ auth0 login
uses Auth0 Device Flow to get anacccess token
and arefresh token
for the selected tenant.- The access token is stored at the configuration file.
- The refresh token is stored at the OS keychain (supports macOS, Linux, and Windows thanks to https://github.com/zalando/go-keyring).
- During regular commands initialization, the access token is used to instantiate an Auth0 API client. - If the token is expired according to the value stored on the configuration file, a new one is requested using the refresh token. - In case of any error, the interactive login flow is triggered.
# Functions
GetAccessTokenFromClientCreds generates an access token from client credentials.
GetDeviceCode kicks-off the device authentication flow by requesting a device code from Auth0.
RefreshAccessToken retrieves a new access token using a refresh token.
WaitUntilUserLogsIn waits until the user is logged in on the browser.
# Variables
No description provided by the author
# Structs
ClientCredentials encapsulates all data to facilitate access token creation with client credentials (client ID and client secret).
Credentials is used to facilitate the login process.
No description provided by the author
No description provided by the author
No description provided by the author