diff --git a/Auth0/CredentialsManager.swift b/Auth0/CredentialsManager.swift index f4fdc22f..85c58c31 100644 --- a/Auth0/CredentialsManager.swift +++ b/Auth0/CredentialsManager.swift @@ -134,6 +134,8 @@ public struct CredentialsManager { /// /// This method is not thread-safe, so if you're using Refresh Token Rotation you should avoid calling this method /// concurrently (might result in more than one renew request being fired, and only the first one will succeed). + /// Note that this will also happen if you call this method repeatedly from the same thread, so we recommend using + /// a queue to ensure that only one request can be in flight at any given time. /// /// ``` /// credentialsManager.credentials { diff --git a/README.md b/README.md index 00c533f8..b87e4cbd 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,7 @@ credentialsManager.store(credentials: credentials) Credentials will automatically be renewed (if expired) using the refresh token. The scope `offline_access` is required to ensure the refresh token is returned. -> This method is not thread-safe, so if you're using Refresh Token Rotation you should avoid calling this method concurrently (might result in more than one renew request being fired, and only the first one will succeed). +> This method is not thread-safe, so if you're using Refresh Token Rotation you should avoid calling this method concurrently (might result in more than one renew request being fired, and only the first one will succeed). Note that this will also happen if you call this method repeatedly from the same thread, so we recommend using a queue to ensure that only one request can be in flight at any given time. ```swift credentialsManager.credentials { error, credentials in