hey I'm trying to get sign in with google working ...
# ory-network
e
hey I'm trying to get sign in with google working on an ory network/cloud set up. i got the connection set up and sign in with google redirects back to a registration flow. I try to go through registration but it just redirect me back to google in an infinite loop. In the console I see Registration Failed events without further detail. On the client side all I see is that
Copy code
Refused to send form data to 'https://<project-name>.<http://projects.oryapis.com/self-service/registration?flow=<flow-id|projects.oryapis.com/self-service/registration?flow=<flow-id>>' because it violates the following Content Security Policy directive: "form-action 'self' <https://project.console.ory.sh> https://*.<http://projects.oryapis.com|projects.oryapis.com> <https://console.ory.sh> https://*.projects.console.ory.sh <https://api.console.ory.sh> <https://github.com>".
Note I'm testing this from the
https://<project-name>.<http://projects.oryapis.com/ui/registration?flow=|projects.oryapis.com/ui/registration?flow=><flow-id>
domain so not sure why this csp is happening. the actual form request seems to get a 303 redirect back with no error information
h
Can you share your project URL?
d
Hey @enough-nightfall-77939, I'm seeing this same issue as well. Did you ever find a fix?
e
The default jsonnet for google isn't correct for the default schema so you have to edit it (it's under the advanced settings iirc)
d
got it, thanks!
h
What is incorrect? I want to fix it :)
d
the default data mapping was adding several traits from the claims objects – I'm guessing that because I was only using the default email identity schema, the extra fields were causing an error (removing them fixed the issue)
this is what I ended up with:
Copy code
local claims = {
  email_verified: true,
} + std.extVar('claims');

{
  identity: {
    traits: {
      email: claims.email,
    },
  },
}
g
I had the same issue, it took me a while to figure out it was because of the data mapping. Why does it cause a redirect loop instead of erroring out? I thought
additionalProperties
would remove all properties not set in the identity schema and proceed with the flow, but apparently it silently fails?