Updating native registration flow with OIDC ID token for existing identity returns breaking response
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- openapi, swift
- 领域
- api, authentication
调研方向
首先查看报告中链接的 Native Apps API 操作 Update Registration Flow 和 Create Registration Flow,然后将其记录的成功 schema 与所描述的 OIDC 现有身份响应进行比较。未指定任何 repository 文件或测试,因此请追踪 API 规范和响应处理;当记录的契约与 generated client 的解析在注册和登录结果两种情况下都一致时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
https://vigorous-leakey-ouzelmh6hd.projects.oryapis.com
Describe the bug
When updating a native registration flow (POST /self-service/registration) the identity property of the successful response is marked as required in the Open API specification. That property contains details about the new identity that was created.
However, when updating the registration flow with an ID token received from an OIDC provider and Ory finds an existing identity based on the subject in the token, then a login on that identity is performed instead. When that happens, the response format instead looks like the successful response from Submit a Login Flow (POST /self-service/login). In that response there is no identity property.
When using an auto generated client, the parsing of the response might fail since the identity is required and the caller does't know the registration ended up in a login. I would expect differences between how this is handled by clients in different programming languages, but in a strictly typed language like Swift this becomes a breaking error.
Reproducing the bug
- Create an identity using any OIDC provider
- Start a registration flow by calling Create Registration Flow for Native Apps
- Authenticate to receive an ID token from the same provider used in step 1.
- Complete registration with the ID token by calling Update Registration Flow
Expected 200 response:
A JSON object containing the required identity property at root level.
Actual 200 response:
A JSON object without the required identity property at root level. The identity is however included in the session property.
Relevant log output
Relevant configuration
Version
Ory Network
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response
- 主要语言
- Shell
- 星标
- 96
- 派生
- 8
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ory/network 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 38/100
-
feat
难度 5/5 一周以上 新手友好度 25/100
-
bug
难度 4/5 3-5 天 新手友好度 30/100
-
feat
难度 5/5 一周以上 新手友好度 35/100
-
User settings flow "back" button takes you to homepage可能重新可做 @jonas-jonas 于 384 天前认领,目前没有进行中的 PR。 未关闭bug
相似的 Issue
-
bot-found bug priority: P3
难度 2/5 1-3 小时 新手友好度 84/100
madenvel/KalinkaPlayer#179 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 86/100
jbaruch/coding-policy#621 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 90/100
mattpocock/skills#1134 ·
-
area:build bug P3
难度 1/5 1 小时以内 新手友好度 92/100
uttrflow/uttrflow-swift#2506 ·
维护者通常 1 天内回复