Error occured while setting up of pgp sso: 400 BA...
# gooddata-platform
h
Error occured while setting up of pgp sso: 400 BAD REQUEST For input string: "1689802287," Error code='gdc007' Request id='O3VU4gRIBZ7cFboz:uAfHL04FvQskdwgN' Error id='9bacb5d0-7e84-40e5-b601-42395770e72e' json for encrypted claims: { email: 'hrisi@gmail.com', validity: 1689802287, notOnOrAfter: 1689763287, notBefore: 1689762687 } { "pgpLoginRequest": { "ssoProvider": "pgp-***.com", "targetUrl": "/dashboards/embedded", "encryptedClaims": "-----BEGIN PGP MESSAGE-----\hQEMA11tX1FLU9c7AQf/WjtF6OiQW4YRu3Uz0K3cAiB9Wq9W+YszbnLh3ZZ2DnEZ ...... xglkqshaylW65DmVXF5QRO6xJN5+\n=\n3TiB-----END PGP MESSAGE-----" } }
m
Hi Hrashikesh, The request is failing with a malformed exception. Please make sure your encrypted claims have been stringified correctly. You can also use an online tool such as: https://www.freeformatter.com/json-escape.html#ad-output
h
Thanks @Moises Morales
1
Request URL: https://avallano.on.gooddata.com/gdc/account/customerlogin Request Method: POST Status Code: 302 Remote Address: 148.62.70.178:443 Referrer Policy: strict-origin-when-cross-origin when i passed to this const domain = "https://ava.on.gooddata.com/"; const sdk = getFactory({ domain }); const encryptedClaims = "-----BEGIN PGP MESSAGE-----\r\n\r\nhQEMA11tX1FLU9c7AQgAmLlnW7Th7G2w48tL6YJLL7pX0pL1oL1Nf8W668307jUr\r\nyGJL4j6H............XXVv67AOJ/yy9smh3QXesC09vSdPcRLACvzJA26ZJzmQshnt82uBRFZzkNC\r\n=fwho\r\n-----END PGP MESSAGE-----"; const ssoProvider = "pgp-*****.com"; const targetUrl = "/dashboards/embedded"; // keep this URL set to /gdc/account/token sdk.user .loginSso(encryptedClaims, ssoProvider, targetUrl) .then((res) => { console.log(res); console.log(res, "ress??"); // now you are logged in, and calls to GoodData will be authorized }) .catch((error) => { // something went wrong, see the browser console for details console.error("eerr", error); }); }, []);
m
The error does not seem to be related to pgp authentication anymore, but your app does not know where to consume it. I would recommend making sure you have set your CORS policy correctly, the call is documented in our API documentation. Feel free to check the resources below as well: GoodData.UI: PGP SSO Example | The GoodData Community Set Up Authentication and Single Sign-On · GoodData.UI
If you’re still having issues, send us the exact error you are getting in the developer console. Please also avoid sharing any sensitive details publicly.
h
how to impliment getFactorey with backend in react sdk
http://abc.gooddata.com refused to connect.
m
It seems this is now an unrelated issue. Could you please post your question to our UI SDK channel so we can continue assisiting: https://gooddataconnect.slack.com/archives/C01UR5BGAHY?