Oauth pkce error without details

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

:waving_hand: 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

OAuth API
OAuth API
Test Authorization with Web Server

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

https://app.squareup.com/oauth2/users/authorize?client_id=sq0idp-redacted&code_challenge=7_52N67dVtNxq82S9xoidnMxO0ILmdZRFa7m7R2ByAQ&code_challenge_method=S256&nonce=HdUsr6XzGxFBYdjXnrdHK1v0f7ztc_XwYHEOBPQ4rE4&redirect_uri=https%3A%2F%2Fmy-app.app%2Fopenid&response_type=code&scope=MERCHANT_PROFILE_READ&state=something&session=false

Do you have the sandbox Dashboard open in another tab? That’s required for testing sandbox OAuth. :slight_smile:

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