You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Authorization Code Flow against Kratos + Hydra server, the user may not have an account with Kratos. In this scenario. The user will go through the registration flow of Kratos. After calling UpdateRegistrationFlow API in the UI, the Kratos returns a flow ID of verification flow and the UI navigates the user to verification. Then the user verified their email, but the response of UpdateVerificationFlow doesn't have a link to the consent page URL.
Reproducing the bug
Register an oauth2 app with Authorization Code flow support.
Start all containers
start the oauth2 code flow.
the app will redirect to the hydra oauth2 authorize endpoint.
Request:
GET http://127.0.0.1:4444/oauth2/auth?response_type=code&client_id=efd576ee-90bb-4363-9cd2-792bf9fb5a0c&state=NVQwd1RBeFBRQWZrX3hGNTVMR09BUzJ6ZTBsUUhxSUMzNGtuZ21Vdy5rV2p5&redirect_uri=http%3A%2F%2Flocalhost%3A4200&scope=openid%20offline_access%20offline%20email%20profile&code_challenge=bnA6z2C3KJInd4lgKIsPxcMCMnpaioZIGNx-KBjPhb0&code_challenge_method=S256&nonce=NVQwd1RBeFBRQWZrX3hGNTVMR09BUzJ6ZTBsUUhxSUMzNGtuZ21Vdy5rV2p5
Then I start the registration flow, my frontend app start call the CreateBrowserRegistrationFlow endpoint.
Request:
GET http://127.0.0.1:4433/self-service/registration/browser?login_challenge=61gTr3mbLnjo2NQVCxbKWFDoU8NWa7jetyXVrHYjptOoWfd-CJcUJYigkPGkACJDsA7q8Wl4wIti3FOCBxl4P9Fz3Sz866ZWHU2OX8AjddHGg-bRaGcccrMk2YjUqTqy4tP1k9d3IHjzdjOfexIcnBjIArpBoZrVJ74xHC4U-M-2gZabGow_otc_oTaqUYHRjRIds6kOEe4rVxlyW9E8eowVvKSNKfTRcJSkp1pdT6vGowJFMv5kFhiVbuUjWi8wn49ZT6SzIotcv5RZxMJ3nF-X5SmI4KQrqpJrUGc5bYb9CWQGQVqNj_u9638jzSxdasoTuQRZACIctVY7hCA4ICp2D39X9DDCG8f9gqSI2jiB8i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k_x6YTDpP1dKZ9T4VlQolAb-aH_PrF8a8-8OVpm8N5X003D_7c3ZcmMFIC2rLNLsoBC3Bq0vevCoZadxkpGv5Lvz35fubyfrdLwWdxoXD6rWmHECToLbAWeFpkQTQZgVYsBRe1IHFpUaGrU2gvUL3MYx7loKltD0BFmC8qwKx9IjRpnUUkJBZcnJ4ycgEK2AcxLuDlT02WvC5IedgduZvPM_Pp_ZxUslK_bMQR6ID3eSjQOR73sLN2EQKQrEgLEVgCNv8LrKR04Asp-ukqAB6-1SGroJ5Qu8FTXRwHAi1w-AuZ6UaFFYdiz59aF81_5Tqr-fOWP2Z-wt1ai3-4_l
EverettSummer
changed the title
Registration flow doesn't return to consent flow after verification for ajax api when using with kratos+hydra
Registration flow doesn't return to consent flow after verification via ajax api when using with kratos+hydra
Dec 1, 2024
Currently, I use this workaround.
get the return_to from the response of the API CreateLoginFlowForBrowser. and append it to the url of the registration page, then pass the return_to to the after_verification_return_to parameter. so that I can return to the OAuth2 flow after verified email.
But this is a little inconvenient. Hydra will redirect to the login page again, and we cannot set the login flow to skip the password re-verification when the user has already logon.
Preflight checklist
Ory Network Project
No response
Describe the bug
When using the Authorization Code Flow against Kratos + Hydra server, the user may not have an account with Kratos. In this scenario. The user will go through the registration flow of Kratos. After calling UpdateRegistrationFlow API in the UI, the Kratos returns a flow ID of verification flow and the UI navigates the user to verification. Then the user verified their email, but the response of UpdateVerificationFlow doesn't have a link to the consent page URL.
Reproducing the bug
Request:
GET http://127.0.0.1:4444/oauth2/auth?response_type=code&client_id=efd576ee-90bb-4363-9cd2-792bf9fb5a0c&state=NVQwd1RBeFBRQWZrX3hGNTVMR09BUzJ6ZTBsUUhxSUMzNGtuZ21Vdy5rV2p5&redirect_uri=http%3A%2F%2Flocalhost%3A4200&scope=openid%20offline_access%20offline%20email%20profile&code_challenge=bnA6z2C3KJInd4lgKIsPxcMCMnpaioZIGNx-KBjPhb0&code_challenge_method=S256&nonce=NVQwd1RBeFBRQWZrX3hGNTVMR09BUzJ6ZTBsUUhxSUMzNGtuZ21Vdy5rV2p5
Response:
Request:
Response:
Request:
POST http://127.0.0.1:4433/self-service/registration?flow=8256e608-5fd7-45f2-bca5-7aa790189e8b
Response:
continue_with
array and redirects to verification page.Request:
GET http://box.moe:4433/self-service/verification/flows?id=cc4376f1-9dd3-4926-9966-47e0b0fe0b2a
Response:
Request:
POST http://127.0.0.1:4433/self-service/verification?flow=cc4376f1-9dd3-4926-9966-47e0b0fe0b2a
Request Body
Response:
The issue is the final response doesn't contain links to consent page.
Relevant log output
Relevant configuration
Version
1.3.1
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
Hydra version is 2.2.0
The text was updated successfully, but these errors were encountered: