Question
Vodafone
IN
Last activity: 19 Sep 2024 13:16 EDT
authenticating-pega-infinity-server - The client is not authorized to request authorization code
I have been following up steps mentioned in below url to authenticate infinity server from custom-dx-components package and getting an error message as
error:
{ "errors":[ { "error": "unauthorized_client", "error_description":"The client is not authorized to request authorization code", "state":"hPnZCj_Kdh1uo0Gdg7Stp1SXPbeivhHjF7fncUlQPXI" } ] }
Please see attached documents for more detail.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Vodafone
IN
@VinodSeraphin This issue has been resolved.
Updated: 28 Feb 2024 12:43 EST
Pegasystems Inc.
US
@BhushanN16954894 It appears your tasks.config file is setup for using the authorization code grant type but your referenced OAuth 2.0 client registration document is likely configured for "password credentials" grant type.
We now recommend your authorization code grant flow and the OAuth 2.0 client registration doc named "DX-ComponentDev" rather than the prior confidential OAuth 2.0 client registration document named "DX-CustomComponents".
I would suggest creating a new DX Component Builder project and move over you previously developed components by copying over your specific component folder(s).
Latest instructions on how to initialize and configure a new DXCB project:
...and latest info about the various tasks.config settings (there is still a way to configure newer project to use the prior password credentials grant type)
@BhushanN16954894 It appears your tasks.config file is setup for using the authorization code grant type but your referenced OAuth 2.0 client registration document is likely configured for "password credentials" grant type.
We now recommend your authorization code grant flow and the OAuth 2.0 client registration doc named "DX-ComponentDev" rather than the prior confidential OAuth 2.0 client registration document named "DX-CustomComponents".
I would suggest creating a new DX Component Builder project and move over you previously developed components by copying over your specific component folder(s).
Latest instructions on how to initialize and configure a new DXCB project:
...and latest info about the various tasks.config settings (there is still a way to configure newer project to use the prior password credentials grant type)
- Vinod
Updated: 28 Feb 2024 7:16 EST
Vodafone
IN
@VinodSeraphin I am getting below error after importing new client registeration. Please find attached document for complete detail..
Authentication failed:TypeError: Cannot read properties of undefined (reading 'errors') Authentication failed:false
Pegasystems Inc.
US
@BhushanN16954894 You are missing the redirectUri value for the authCode grant type within your tasks.config.json file. It should be set to: "redirectUri": "https://localhost:4010/",
And this redirect uri should be specified as one of the legitimate redirects within the OAuth 2.0 public client registration document you have created.
Vodafone
IN
@VinodSeraphin : I had already tried with this redirect uri and I was getting the Timedout error. I have again tried everything with this uri and getting Timedout error as mentioned below.
Token endpoint error: FetchError: request to https://test.sandbox-pegacop-vois.com/prweb/PRRestService/oauth2/v1/token failed, reason: connect ETIMEDOUT Proprietary information hidden:443 Authentication failed:TypeError: Cannot read properties of undefined (reading 'errors') Authentication failed:false
Please see attached document (Authentication Error_2.docx) for complete detail.
Accepted Solution
Vodafone
IN
@VinodSeraphin This issue has been resolved.
EY
US
@BhushanN16954894can you share how this issue was resolved? I'm facing the same issue and can't find another instance of this error anywhere