Provisioning key working

This commit is contained in:
Owen
2026-03-26 17:23:19 -07:00
parent 69019d5655
commit b43572dd8d
4 changed files with 159 additions and 5 deletions

View File

@@ -481,6 +481,11 @@ func (c *Client) connectWithRetry() {
func (c *Client) establishConnection() error {
ctx := context.Background()
// Exchange provisioning key for permanent credentials if needed.
if err := c.provisionIfNeeded(); err != nil {
return fmt.Errorf("failed to provision newt credentials: %w", err)
}
// Get token for authentication
token, err := c.getToken()
if err != nil {