I use the oauth flow to allow users to authorize my Salesforce app to access the API on their behalf.
Depending on input in my app, I either prompt them with
But once they authenticate and are redirected back to my app, with a
code parameters attached via URL params, I no longer know whether they were on sandbox or not.
Is there a way to persist that info, from the point of going to the Salesforce authorize url, to the point of returning to the page with the code? Either through the redirect uri (like, by adding query parameters onto it) or other?
Or perhaps seeing which URL the redirect just came from? Because that's the info I need. I don't need arbitrary parameters saved. I need specifically whether the authorization was sandbox or regular.