billions-minister-2901
03/11/2024, 4:43 PMchilly-king-10285
03/11/2024, 4:43 PMchilly-king-10285
03/11/2024, 4:44 PMhd
claim when logging in via Google, you need to modify the data mapping in your Ory Identity configuration. In the Jsonnet code snippet that maps the Google claims to the Ory Identity schema, you can remove or comment out the line that maps the hd
claim. Here is the original Jsonnet code snippet: jsonnet local claims = { email_verified: false, } + std.extVar('claims'); { identity: { traits: { [if 'email' in claims && claims.email_verified then 'email' else null]: claims.email, first_name: claims.given_name, last_name: claims.family_name, [if 'hd' in claims && claims.email_verified then 'hd' else null]: claims.hd, }, }, }
You can modify it to look like this: jsonnet local claims = { email_verified: false, } + std.extVar('claims'); { identity: { traits: { [if 'email' in claims && claims.email_verified then 'email' else null]: claims.email, first_name: claims.given_name, last_name: claims.family_name, // [if 'hd' in claims && claims.email_verified then 'hd' else null]: claims.hd, }, }, }
After modifying the Jsonnet code snippet, you need to encode it with Base64 or host it under a URL accessible to Ory Network. Then, you need to update the Ory Identities configuration using the Ory CLI: bash ory update identity-config {project-id} --file identity-config.yaml
Please note that {project-id}
should be replaced with your actual project ID and identity-config.yaml
should be replaced with the path to your updated identity configuration file. For more information, please refer to the [Ory documentation](https://www.ory.sh/docs/kratos/social-signin/google#data-mapping).billions-minister-2901
03/11/2024, 4:47 PM<https://auth-ory-dev.pudgyworld.com/self-service/registration?flow=706c878d-d57c-4116-bc06-2cf73e671eb5>
Registratino failed
chilly-king-10285
03/11/2024, 4:47 PMchilly-king-10285
03/11/2024, 4:47 PM/self-service/registration
is called with incorrect parameters or in the wrong context, it could return various error codes like 400 (Bad Request), 410 (Gone), or 422 (Unprocessable Entity). [source](https://www.ory.sh/docs/kratos/reference/api) To troubleshoot the issue, you could check the browser's network tab to see the exact API call that's failing and the error message it's returning. You could also check the server logs for any error messages. If you're still having trouble, you might find it helpful to refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/) or the [Ory Community](https://community.ory.sh/) for more help.