Welcome to OAuth-Proxy.com
OAuth-Proxy.com simplifies the desktop OAuth cycle by enabling restriction-free dynamic redirect URIs.
Your dynamic redirect URI can be any URL you can dream up including URLs that start with:
https://
http://
localhost
localhost:###
OAuth in Desktop Apps
Normally, when you want to initiate an OAUTH authorization, you redirect the user to a URL link this:
https://app.somesite.com/oauth/authorize?response_type=code&client_id={ClientId}&redirect_uri={RedirectUri}&state={State}
Pretty much all systems require that the redirect_uri
be a public domain web url. This works great when you're building a web
app but not so much when when you're dealing with a desktop app.
OAuth-Proxy.com overcomes this limitation!
Setting Your Dynamic Redirect Uri
To enable dynamic OAUTH URLs, do the following:
- Add
https://oauth-proxy.com/v1/oauth
as an approved redirect uri for your app. (You'll do this with the company whose app you are OAUTHing into.) - Change your
?state=
parameter to be an encoded URL (with any parameter values).
For example, if you want your user to end up at:
https://127.0.0.1:45234/auth/callback?state=ABCDEFG
Use something like this:
var ClientId = "xxx";
var RedirectUri = "https://oauth-proxy.com/v1/oauth";
var FinalUri = "https://127.0.0.1:45234/auth/callback?state=ABCDEFG";
var State = HttpUtility.UrlEncode(FinalUri);
var AuthUri = $@"https://app.somesite.com/oauth/authorize?response_type=code&client_id={ClientId}&redirect_uri={RedirectUri}&state={State}";
System.Diagnostics.Process.Start(AuthUri);
Once the user completes the oauth, they will be directed to: https://127.0.0.1:45234/auth/callback?state=ABCDEFG
Additional Features
The following URLs are also available:
- https://oauth-proxy.com/v1/success
- https://oauth-proxy.com/v1/error
And their content can be customized by using a URL like:
- https://oauth-proxy.com/v1/success?title=Hello&Message=World
- https://oauth-proxy.com/v1/error?title=Something&Message=broke