Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm @ory/client - Objects being duplicated when calling OAuth2Api.acceptOAuth2ConsentRequest() #321

Open
4 of 5 tasks
dannycarrera opened this issue Feb 2, 2024 · 0 comments
Labels
bug Something is not working.

Comments

@dannycarrera
Copy link

Preflight checklist

Ory Network Project

No response

Describe the bug

When assigning an object (such as name) to id_token and calling OAuth2Api.acceptOAuth2ConsentRequest(), the resulting localStorage value is duplicated.

Reproducing the bug

  1. Self host Ory Kratos
  2. Self host Ory Hydra
  3. Attach object to id_token
  4. Call OAuth2Api.acceptOAuth2ConsentRequest()
  5. Inspect localStorage in the browser

Relevant log output

{  
    "profile": {
        "name": [
            {
                "first": "John",
                "last": "Doe"
            },
            {
                "first": "John",
                "last": "Doe"
            }
        ],
    },
}

Relevant configuration

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Person",
    "type": "object",
    "properties": {
      "traits": {
        "type": "object",
        "properties": {
          "name":{
            "type":"object",
            "properties": {
              "first": {
                "type":"string",
                "title":"Your first name",
                "minLength": 1,
                "maxLength": 32
              },
              "last": {
                "type":"string",
                "title":"Your last name",
                "minLength": 1,
                "maxLength": 32
              }
            },
            "required": ["first","last"]
          }
        },
        "required": ["name"]
      }
    },
    "additionalProperties": false
  }

Version

1.5.2

On which operating system are you observing this issue?

Windows

In which environment are you deploying?

Binary

Additional Context

No response

@dannycarrera dannycarrera added the bug Something is not working. label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant