kratos icon indicating copy to clipboard operation
kratos copied to clipboard

Social Sign In - metadata_public / metadata_admin fields defined in JSONNET snippet not set

Open vafokroy opened this issue 3 years ago • 0 comments

Preflight checklist

Describe the bug

We enabled Social Sign In with Google for our self hosted Ory Kratos project. In the required Jsonnet snippet we defined some keys in the metadata_public field. After sign in via Google the metadata_public field of the new created user is null.

We also tested this with metadata_admin and had the same result.

In the documentation is written:

You can set public and admin metadata fields, these fields will then be populated whenever data is mapped.

Reproducing the bug

Enable Google Social Sign In and use a JSONNET config file with keys set in metadata_public.

Relevant log output

No response

Relevant configuration

local claims = {
    email_verified: true,
} + std.extVar('claims');

{
    identity: {
        traits: {
            [if 'email' in claims && claims.email_verified then 'email' else null]: claims.email
        },
        metadata_public: {
            lorem: "ipsum"
        },
        metadata_admin: {
            dolor: "sit"
        }
    }
}

Version

v0.10.1

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Other

Additional Context

No response

vafokroy avatar Sep 22 '22 13:09 vafokroy