I am unable to get the oauth flow working in sandbox or production.
It reports a Errors::NotFound which isn’t too helpful. Same error in both sandbox and production
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
Here is the auth url I am using for production
Do you have the sandbox Dashboard open in another tab? That’s required for testing sandbox OAuth. ![]()
Yes, that’s not the issue. I did have it open. As I mentioned, its the same with sandbox and production.
Here’s what I found though. We are using an oidc/oauth2 library to manage the pkce flow for this and a host of other oauth2/oidc providers which uses the well-known endpoint for discovery instead of the hardcoded authorization endpoint.
the endpoint below and the corresponding production endpoints return the configuration where the authorization endpoint is /oauth2/users/authorize while your hardcoded url is /oauth2/authorize. Perhaps your well-known configuration needs to be fixed
https://connect.squareupsandbox.com/.well-known/openid-configuration
