Join Slack
Powered by
{ "message": "Request failed with status code ...
# ory-selfhosting
l
lively-flower-51944
06/09/2022, 10:13 AM
{ "message": "Request failed with status code 422", "name": "AxiosError", "stack": "AxiosError: Request failed with status code 422\n at
https://cdnjs.cloudflare.com/ajax/libs/axios/1.0.0-alpha.1/axios.min.js:1:11403
\n at XMLHttpRequest.p (
https://cdnjs.cloudflare.com/ajax/libs/axios/1.0.0-alpha.1/axios.min.js:1:11548
)", "config": { "transitional": { "silentJSONParsing": true, "forcedJSONParsing": true, "clarifyTimeoutError": false }, "transformRequest": [ null ], "transformResponse": [ null ], "timeout": 0, "xsrfCookieName": "XSRF-TOKEN", "xsrfHeaderName": "X-XSRF-TOKEN", "maxContentLength": -1, "maxBodyLength": -1, "env": {}, "headers": { "Accept": "application/json, text/plain, */*", "Content-Type": "application/json" }, "url": "
http://127.0.0.1:5009/self-service/registration
", "method": "post", "withCredentials": true, "params": { "flow": "105a0324-fdb2-4660-8bcc-bbe96015e530" }, "data": "{\"csrf_token\":\"SXg2aZGCjnFWddJJDlxtJ8e4Dl3G3ZsV+7L6V/fOEU96FA08uYEmtp0JXu67QiuQJPqL5xWuCp3zrqjvIVispA==\",\"method\":\"oidc\",\"provider\":\"google\",\"traits\":{}}", "maxRedirects": 10 }, "code": "ERR_BAD_REQUEST", "status": 422 } it is the log when i log the error. and here below i will send you the response when i submit oidc registration flow {"error":{"id":"browser_location_change_required","code":422,"status":"Unprocessable Entity","reason":"In order to complete this flow please redirect the browser to:
https://accounts.google.com/o/oauth2/v2/auth?claims=%7B%22id_token%22%3A%7B%22email%22%3A%7B%22essential%22%3Atrue%7D%2C%22family_name%22%3A%7B%22essential%22%3Atrue%7D%2C%22given_name%22%3A%7B%22essential%22%3Atrue%7D%7D%7D
\u0026client_id=
1037621434967-mr214kbqhup2enobaaonr1uoi25vpv00.apps.googleusercontent.com
\u0026redirect_uri=http%3A%2F%2F127.0.0.1%3A5009%2Fself-service%2Fmethods%2Foidc%2Fcallback%2Fgoogle\u0026response_type=code\u0026scope=openid+email+profile\u0026state=494dd23c-837c-4f01-bbda-02f193fa6958","message":"browser location change required"},"redirect_browser_to":"
https://accounts.google.com/o/oauth2/v2/auth?claims=%7B%22id_token%22%3A%7B%22email%22%3A%7B%22essential%22%3Atrue%7D%2C%22family_name%22%3A%7B%22essential%22%3Atrue%7D%2C%22given_name%22%3A%7B%22essential%22%3Atrue%7D%7D%7D
\u0026client_id=
1037621434967-mr214kbqhup2enobaaonr1uoi25vpv00.apps.googleusercontent.com
\u0026redirect_uri=http%3A%2F%2F127.0.0.1%3A5009%2Fself-service%2Fmethods%2Foidc%2Fcallback%2Fgoogle\u0026response_type=code\u0026scope=openid+email+profile\u0026state=494dd23c-837c-4f01-bbda-02f193fa6958"} and here is my oidc config providers: - id: google mapper_url: file:///etc/config/oidc.google.jsonnet provider: google client_id: <id> client_secret: <secret> scope: - openid - email - profile requested_claims: id_token: email: essential: true given_name: essential: true family_name: essential: true what can be possible issues with my current setup. -> same response come when i request through (insomania/browser/without any ui). tried all but it is not redirecting me to google page
lively-flower-51944
06/09/2022, 10:16 AM
Am i missing any configuration from google oauth setup side? or what should we add there as redirect_uri or allowed uri ? and what will we put in traits when using oidc method?
204
Views
Open in Slack
Previous
Next