pingone-sample-js icon indicating copy to clipboard operation
pingone-sample-js copied to clipboard

Application showing error after SignOn

Open sambhavjain9138 opened this issue 4 years ago • 2 comments

I tried implementing the code but its not working for me. After clicking on signon, it shows an error that "The request could not be completed. The requested resource was not found." After clicking on details, it shows the following 3 details:

  1. id: e99666da-b2d4-476a-8a1e-8ec5c7bdb6dc
  2. code: NOT_FOUND
  3. details: The request could not be completed. The requested resource was not found.

My configuration for the connection are: var authClient = new PingOneAuthClient({ environmentId: "0ab96911-1e59-4e94-b12b-5473b81e41d1", clientId: "e0889f8a-82cd-4c7d-a781-f16cf73acdeb", redirectUri: 'http://localhost:8080', postLogoutRedirectUri: 'http://localhost:8080', scopes: ['openid','email'], responseType: ['token', 'id_token'], pkce: false });

Can you please help me resolve the error?


I then added one more parameter to the AuthClient. "AUTH_URI: 'https://auth.pingone.asia" But the problem still persists. In my console it shows error of "p14c-js-sdk-auth.js:1 Refused to connect to 'https://auth.pingone.asia/0ab96911-1e59-4e94-b12b-5473b81e41d1/as/.well-known/openid-configuration' because it violates the following Content Security Policy directive: "default-src https://auth.pingone.com https://auth-staging.pingone.com https://api.pingone.com https://api-staging.pingone.com https://apps.pingone.com https://apps-staging.pingone.com https://cdn.polyfill.io https://cdn.shoelace.style 'unsafe-inline'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback."

sambhavjain9138 avatar Jun 14 '21 08:06 sambhavjain9138

the readme file wasn't very clear about some steps. The environment for running the auth.js must be sandbox. The default environment was prod. If you create a new environment and set it type sandbox, it might solve your problem.

phil-gratifypay avatar Jun 21 '21 23:06 phil-gratifypay

Hi, I encountered the same problem but on the .eu server. After changing my AUTH_URI and temporarily disabling content policy I'm still stuck with the NOT_FOUND error.

I triple checked, the envID and clientID are matching with the console

Do you have any clues on why?

MaximeLP5 avatar Aug 17 '21 15:08 MaximeLP5