mirror of
https://github.com/fosrl/newt.git
synced 2026-03-27 04:56:41 +00:00
Provisioning key working
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user