doohickey authClient allows you to automate the process of capturing OAuth tokens in order to store them as secrets. OAuth 2.0 is currently the only supported auth flow. Learn more about OAuth 2.0.
doohickey authClient subcommand accepts one optional argument specifying the
alias of a new or existing auth client
doohickey authClient create will prompt the user for the information required to create an auth flow. Some prompts can be avoided by specifying the information with a flag. Once created, the auth client will need to be started before it can generate a secret from the auth flow.
|string||Target environment to deploy auth client|
|string||Name to give the auth client|
|string||Redirect url to be used for an OAuth2 flow|
|string||Success url to be used for an OAuth2 flow|
Information you will need to create an OAuth 2.0 auth client:
- Client id
- Client secret
- Authorization endpoint
- Refresh token endpoint
The authorization endpoint url must be provided in a way that tokenizes the non-static values. In the example below we see that the authorization endpoint has parameters for
state. When an auth flow is started with this auth client, the parameterized values will be filled in with the relevant values.
Below is an example of creating an auth client for a Shopify store.
doohickey authClient start will create an OAuth 2.0 flow from an existing auth client. After answering the prompts the user is given a link they can use to authenticate via a web browser. Once the authentication and authorization is complete, a secret containing the access token will be saved in Open Integration Hub.
Below is an example of starting an auth flow from the auth client created in the example above. Note that the step of clicking the link and authenticating / authorizing in a web browser is not shown.
doohickey authClient view will list the auth clients created in an environment.