adamant-angle-54989
06/15/2023, 10:08 AMGET https://{project}.<http://projects.oryapis.com/self-service/login/api|projects.oryapis.com/self-service/login/api>
and after than I am hitting API to submit login flow POST https://{project}.<http://projects.oryapis.com/self-service/login?flow=|projects.oryapis.com/self-service/login?flow=><flow-id>
and json data in body as
{
"method": "oidc",
"provider": "google",
"traits": {}
}
I am getting 422 response as
{
"error": {
"id": "browser_location_change_required",
"code": 422,
"status": "Unprocessable Entity",
"reason": "In order to complete this flow please redirect the browser to: <https://accounts.google.com/o/oauth2/v2/auth?client_id=><my_clinetId>&redirect_uri=https%3A%2F%2F<my_project>.<http://projects.oryapis.com|projects.oryapis.com>%2Fself-service%2Fmethods%2Foidc%2Fcallback%2Fgoogle&response_type=code&scope=email+profile+openid&state=<some-string>",
"message": "browser location change required"
},
"redirect_browser_to": "<https://accounts.google.com/o/oauth2/v2/auth?client_id=><my_clinetId>&redirect_uri=https%3A%2F%2F<my_project>.<http://projects.oryapis.com|projects.oryapis.com>%2Fself-service%2Fmethods%2Foidc%2Fcallback%2Fgoogle&response_type=code&scope=email+profile+openid&state=<some-string>"
}
If paste this link in browser and after login I get error An error occurred with the following message: The browser does not contain the necessary cookie to resume the session. This is a security violation and was blocked. Please clear your browser's cookies and cache and try again!
If i use ory' UI for whole flow, social login works but existing account it gives error An account with the same identifier (email, phone, username, ...) exists already. Please sign in to your existing account and link your social profile in the settings page.
Ideally It should link the accounts
can someone pls help me with steps or instructions to have social logins working with our own UI, not ory UI?proud-plumber-24205
06/15/2023, 11:16 AMadamant-angle-54989
06/15/2023, 11:39 AMAutomatic account linking is not supported
can you please help to identify that which ORY API I should call after getting id-token or access-token from google or any other provider?proud-plumber-24205
06/15/2023, 11:50 AMproud-plumber-24205
06/15/2023, 11:50 AMproud-plumber-24205
06/15/2023, 11:50 AMproud-plumber-24205
06/15/2023, 11:52 AMadamant-angle-54989
06/16/2023, 9:35 AMcode
query parameter.
3. Ory exchanges the code
for an access token and retrieves the user information.
4. Ory maps the user information to the Identity Schema traits.
5. (optional) Ory redirects back to the registration page, requiring the user to provide the values for the missing traits.
Want to know using which API user is created and session token is generated witin ORYproud-plumber-24205
06/16/2023, 10:00 AMproud-plumber-24205
06/16/2023, 10:00 AMadamant-angle-54989
06/19/2023, 5:03 AMproud-plumber-24205
06/19/2023, 7:15 AMbrowser
flows since those require cookies to be set inside the browser for CSRF protection.
For integrating social sign in with native applications, please check https://www.ory.sh/docs/kratos/social-signin/native-appsadamant-angle-54989
06/19/2023, 8:40 AMadamant-angle-54989
06/19/2023, 12:12 PMproud-plumber-24205
06/19/2023, 12:31 PMadamant-angle-54989
06/20/2023, 7:06 AMAn account with the same identifier (email, phone, username, ...) exists already. Please sign in to your existing account and link your social profile in the settings page.
on ory's UI( becuase automatic account merging is not possible), but we don't want to show ory's UI to our users as we are using our UI interface and we communicate to ory via our backend API.
a. is there any way we can redirect to our UI with similar message/error ?
b. or some other better to tell user about the error without using Ory's UIproud-plumber-24205
06/20/2023, 7:31 AMproud-plumber-24205
06/20/2023, 7:32 AM