adorable-camera-99335
04/06/2023, 9:12 AMory proxy
to develop and test on localhost
⢠When updateLoginFlow
I catch the redirect_browser_to
argument, and use it to continue the flow.
However, the redirect_browser_to
URL to e.g. https://accounts.google.com/o/oauth2/... contains a redirect_uri
value which points to my network instance, instead to localhost:
https://SLUG.projects.oryapis.com/self-service/methods/oidc/callback/PROV_ID
The network instance obviously doesn't have the appropriate cookies, and fails to continue the request.
If I exchange the host manually for localhost:4000/.ory
, I'm getting a
oauth2: cannot fetch token: 400 Bad Request\nResponse: {\n \"error\": \"redirect_uri_mismatch\",\n \"error_description\": \"Bad Request\"\n}
redirect_uri mismatch seems also logically.
My question:
How can I test OAuth2 social providers on localhost? Is it possible in a dev project without a domain CNAME?proud-plumber-24205
04/06/2023, 9:31 AMory tunnel
instead of the ory proxy
? it's part of the Ory CLI and we recommend using it since it doesn't run your application behind the /.ory
path, instead it is treated as a side-car to your application running on a different URL.
Make sure to sign in to the CLI when it asks you to, this fixes the social sign in flow on localhost.
Yes to both questions, you can develop without ever needing a CNAME and yes you can use Social Sign in providers on localhost.proud-plumber-24205
04/06/2023, 9:32 AMadorable-camera-99335
04/06/2023, 9:52 AM