ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
141 stars 85 forks source link

Getting error in the response of "createNativeRegistrationFlow" API : Social Sign In and OpenID Connect are only supported for flows initiated using the Browser endpoint #334

Open PadmajaRaniB opened 7 months ago

PadmajaRaniB commented 7 months ago

Preflight checklist

Ory Network Project

No response

Describe the bug

I am using the api 'createNativeRegistrationFlow' to get the flow_id and i am getting flow id in return, after this, I hit 'updateRegistrationFlow' method using the flow id and id_token of google, I am getting response like below, {"id":"someID","oauth2_login_challenge":null,"type":"api","expires_at":"2024-02-21T13:23:43.931974Z","issued_at":"2024-02-21T13:13:43.931974Z","request_url":"https://myurl/self-service/registration/api","ui":{"action":"https://myurl/public/self-service/registration?flow=flowIdFromtheInput","method":"POST","nodes":[{"type":"input","group":"default","attributes":{"name":"csrf_token","type":"hidden","value":"","required":true,"disabled":false,"node_type":"input"},"messages":[],"meta":{}},{"type":"input","group":"oidc","attributes":{"name":"provider","type":"submit","value":"google","disabled":false,"node_type":"input"},"messages":[],"meta":{"label":{"id":7879758,"text":"Continue","type":"info"}}}],"messages":[{"id":4000001,"text":"Social Sign In and OpenID Connect are only supported for flows initiated using the Browser endpoint.","type":"error"}]}} getting some response but I dont know what this line means "Social Sign In and OpenID Connect are only supported for flows initiated using the Browser endpoint" coming in the response and due to this i can't even see my user on ory. Can someone help me out I want to register my google sign in in the ory

Reproducing the bug

Use the given API's given in the description of bug with basic oryclient setup using dio and hit the createNativeRegistrationFlow API first and using flow id of the createNativeRegistrationFlow API, hit updateRegistrationFlow API

Relevant log output

{"id":"someID","oauth2_login_challenge":null,"type":"api","expires_at":"2024-02-21T13:23:43.931974Z","issued_at":"2024-02-21T13:13:43.931974Z","request_url":"https://myurl/self-service/registration/api","ui":{"action":"https://myurl/public/self-service/registration?flow=flowIdFromtheInput","method":"POST","nodes":[{"type":"input","group":"default","attributes":{"name":"csrf_token","type":"hidden","value":"","required":true,"disabled":false,"node_type":"input"},"messages":[],"meta":{}},{"type":"input","group":"oidc","attributes":{"name":"provider","type":"submit","value":"google","disabled":false,"node_type":"input"},"messages":[],"meta":{"label":{"id":7879758,"text":"Continue","type":"info"}}}],"messages":[{"id":4000001,"text":"Social Sign In and OpenID Connect are only supported for flows initiated using the Browser endpoint.","type":"error"}]}}

Relevant configuration

No response

Version

ory_client: ^1.6.2

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response