Skip to content

Commit

Permalink
Update credentials method documentation (#458)
Browse files Browse the repository at this point in the history
  • Loading branch information
Widcket authored Feb 25, 2021
1 parent 5e2ab3f commit 6ae76d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Auth0/CredentialsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ae76d0

Please sign in to comment.