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
To understand how to fix the problem, let's look at how Ory handles the OIDC registration flow. There are 5 steps that the system
54
-
performs when users register with a social sign-in provider:
96
+
### Social sign-in `redirect_uri_mismatch` error (OTA-092022-01)
55
97
56
-
1. Redirect to the social sign-in provider.
57
-
2. Redirect back to Ory with a `code` query parameter.
58
-
3. Ory exchanges the `code` for an access token and retrieves the user information.
59
-
4. Ory maps the user information to the [Identity Schema traits](../kratos/manage-identities/identity-schema).
60
-
5. (optional) Ory redirects back to the registration page, requiring the user to provide the values for the missing traits.
98
+
This affects only projects created before September 2022 that use a custom domain. For newly added social sign-in providers,
99
+
social sign-in flows can fail with the following message:
61
100
62
-
When step 4 fails, Ory becomes stuck in a redirect loop. To fix the redirect loop, adjust the Jsonnet configuration for the social
63
-
sign-in provider so that the data from the provider gets mapped correctly to the Identity Schema.
101
+
```text
102
+
Unable to complete OpenID Connect flow because the OpenID Provider returned error "redirect_uri_mismatch": The redirect_uri MUST match the registered callback URL for this application.
103
+
```
64
104
65
-
:::tip
105
+
#### Mitigation OTA-092022-01
66
106
67
-
Read [Map and merge profile data](../kratos/social-signin/data-mapping) to learn more.
107
+
To fix the problem, remove the `/selfservice/methods/oidc/config/base_redirect_uri` configuration entry. Run this Ory CLI command:
0 commit comments