Skip to content

Commit 36cacb2

Browse files
DevTKSSCopilot
andcommitted
chore: applying PR rewording suggestion
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent fa13f8b commit 36cacb2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/AspNet.Security.OAuth.Etsy/EtsyAuthenticationOptions.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public EtsyAuthenticationOptions()
4444
/// Gets or sets the endpoint used to retrieve detailed user information.
4545
/// </summary>
4646
/// <remarks>
47-
/// The placeholder for <c>client_id</c> needs to be <c>"{0}"</c> and will be replaced with the authenticated user's ID.
47+
/// The placeholder for <c>user_id</c> needs to be <c>"{0}"</c> and will be replaced with the authenticated user's ID.
4848
/// </remarks>
4949
public string? DetailedUserInfoEndpoint { get; set; }
5050

@@ -55,9 +55,10 @@ public override void Validate()
5555
{
5656
// HACK We want all of the base validation except for ClientSecret,
5757
// so rather than re-implement it all, catch the exception thrown
58-
// for that being null and only throw if we aren't using public access type.
58+
// for that being null and only throw if we aren't using public client access type + PKCE.
59+
// Etsy's OAuth implementation does not require a client secret referring to the Documentation using PKCE (Proof Key for Code Exchange).
5960
// This does mean that three checks have to be re-implemented
60-
// because the won't be validated if the ClientSecret validation fails.
61+
// because they won't be validated if the ClientSecret validation fails.
6162
base.Validate();
6263
}
6364
catch (ArgumentException ex) when (ex.ParamName == nameof(ClientSecret))
@@ -89,7 +90,8 @@ public override void Validate()
8990

9091
if (IncludeDetailedUserInfo && !Scope.Contains(Scopes.EmailRead))
9192
{
92-
// EmailRead scope is required to access detailed user info. As the post configure action should have added it, we need to ensure it's present.
93+
// EmailRead scope is required to access detailed user info when IncludeDetailedUserInfo is enabled.
94+
// The post configure action should have added it at this stage, so we need to ensure it's present.
9395
throw new ArgumentOutOfRangeException(nameof(Scope), string.Join(',', Scope), $"The '{Scopes.EmailRead}' scope must be specified when '{nameof(IncludeDetailedUserInfo)}' is enabled.");
9496
}
9597

0 commit comments

Comments
 (0)