You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A: The library will retry according to the configured `RetryOptions`. If all retries fail, it will call the `OnReAuthenticationError` callback if provided. You can implement custom error handling:
702
-
```go
703
-
OnReAuthenticationError: func(err error) error {
704
-
log.Printf("Re-authentication error: %v", err)
705
-
// Implement your error handling logic
706
-
return err
707
-
}
708
-
```
709
-
710
-
### Q: How do I handle different environments (dev/staging/prod)?
711
-
A: Use environment variables and configuration options:
712
-
```go
713
-
// Development
714
-
options:= entraid.CredentialsProviderOptions{
715
-
ClientID: os.Getenv("DEV_AZURE_CLIENT_ID"),
716
-
TokenManagerOptions: manager.TokenManagerOptions{
717
-
ExpirationRefreshRatio: 0.8, // More aggressive refresh
718
-
},
719
-
}
720
-
721
-
// Production
722
-
options:= entraid.CredentialsProviderOptions{
723
-
ClientID: os.Getenv("PROD_AZURE_CLIENT_ID"),
724
-
TokenManagerOptions: manager.TokenManagerOptions{
725
-
ExpirationRefreshRatio: 0.7,
726
-
RetryOptions: manager.RetryOptions{
727
-
MaxAttempts: 5,
728
-
},
729
-
},
730
-
}
731
-
```
683
+
A: The library will retry according to the configured `RetryOptions`. If all retries fail, the error will be propagated to the client.
0 commit comments