Has anyone had any luck figuring out how to deep l...
# talk-kratos
s
Has anyone had any luck figuring out how to deep link to an OIDC registration flow? We have a particular requirement that people should be able to go directly to our custom OIDC provider (Xero) when coming from a link in the marketplace. This triggers the "Sign up with Xero flow in our app" - I'm a bit confused about exactly how to wire this up.
c
We use the
return_to
with a custom uri scheme like myapp://registration described in the Update Registration Flow API: https://www.ory.sh/docs/kratos/reference/api#tag/frontend/operation/updateRegistrationFlow
s
Excellent, thank you! 🙂
Hey @cuddly-plastic-72839 - if you've got time do you mind giving me some high level steps on how you did this? 🙂 i.e. 1. Generate registration flow, get flow id 2. Apply the
updateRegistrationFlow
call to it (I'm not clear on this step). 3. ??? 4. Profit I've gone through the docs for the update flow and I'm not entirely sure how the pieces fit together.
c
Sure. First of all I'm not affiliated with Ory. 1. Initialize registration API flow:
Copy code
curl --request GET \
      --url '<https://silly-easley-16pa1lzvl4.projects.oryapis.com/self-service/registration/api?return_session_token_exchange_code=true&return_to=http%3A%2F%2Fexample.com%2Fregistration>'
2. Update registration API flow:
Copy code
curl --request POST \
      --url '<https://silly-easley-16pa1lzvl4.projects.oryapis.com/self-service/registration?flow=08d22e2b-900b-476d-9931-a7f6877999dc>' \
      --header 'content-type: application/json' \
      --data '{
      "method": "oidc",
      "provider": "google",
      "traits": {
        "lang": "de",
        "tac": "1234",
        "dp": "4321"
      }
    }'
3. With the last step, Kratos will return you 422 and a link to open in the browser. Follow the
"redirect_browser_to"
and authenticate. 4. Kratos will send you back to the
return_to
you provided. Unfortunately OIDC self-service is incomplete and buggy in version 1. • https://github.com/ory/kratos/issues/3417 • https://github.com/ory/kratos/issues/3420 • https://github.com/ory/kratos/issues/3311 • ...