From c4999cd1d6e187978daf95e808f93cc9cd6ccd12 Mon Sep 17 00:00:00 2001 From: Luciano Balmaceda Date: Tue, 28 May 2019 13:51:20 -0300 Subject: [PATCH 1/2] Update app configuration error message for PKCE --- Auth0/OAuth2Grant.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Auth0/OAuth2Grant.swift b/Auth0/OAuth2Grant.swift index 8a9fd8aa..376fc0ee 100644 --- a/Auth0/OAuth2Grant.swift +++ b/Auth0/OAuth2Grant.swift @@ -106,7 +106,7 @@ struct PKCE: OAuth2Grant { .start { result in // Special case for PKCE when the correct method for token endpoint authentication is not set (it should be None) if case .failure(let cause as AuthenticationError) = result, cause.description == "Unauthorized" { - let error = WebAuthError.pkceNotAllowed("Please go to 'https://manage.auth0.com/#/applications/\(clientId)/settings' and make sure 'Client Type' is 'Native' to enable PKCE.") + let error = WebAuthError.pkceNotAllowed("Please go to 'https://manage.auth0.com/#/applications/\(clientId)/settings' and make sure 'Token Endpoint Authentication Method' is 'None' and 'Application Type' is 'Native' to enable PKCE.") callback(Result.failure(error: error)) } else { callback(result) From 371a29392d56ce969646659123f8bb479d81448c Mon Sep 17 00:00:00 2001 From: Luciano Balmaceda Date: Wed, 29 May 2019 10:18:07 -0300 Subject: [PATCH 2/2] update wording --- Auth0/OAuth2Grant.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Auth0/OAuth2Grant.swift b/Auth0/OAuth2Grant.swift index 376fc0ee..85896c96 100644 --- a/Auth0/OAuth2Grant.swift +++ b/Auth0/OAuth2Grant.swift @@ -106,7 +106,7 @@ struct PKCE: OAuth2Grant { .start { result in // Special case for PKCE when the correct method for token endpoint authentication is not set (it should be None) if case .failure(let cause as AuthenticationError) = result, cause.description == "Unauthorized" { - let error = WebAuthError.pkceNotAllowed("Please go to 'https://manage.auth0.com/#/applications/\(clientId)/settings' and make sure 'Token Endpoint Authentication Method' is 'None' and 'Application Type' is 'Native' to enable PKCE.") + let error = WebAuthError.pkceNotAllowed("Unable to complete authentication with PKCE. PKCE support can be enabled by setting Application Type to 'Native' and Token Endpoint Authentication Method to 'None' for this app at 'https://manage.auth0.com/#/applications/\(clientId)/settings'.") callback(Result.failure(error: error)) } else { callback(result)