acceptedRedirectUrl, failedRedirectUrl, callbackUrl, ...

Nov 15, 2011 at 7:09 PM

I have tried the web sample and I struggle with all the URLs.

Please explain the use of acceptedRedirectUrl, failedRedirectUrl, callbackUrl and the "<label id="lblReturnUrl" for="returnUrl">Redirect domain" (vocabulary used in Windows Live) that you set on the OAuth provider.</label>

How do you set these URLs? What is the purpose of each of them?

Nov 17, 2011 at 6:55 AM

acceptedRedirectUrl: a URL for user accepted your program/application's permission request.

failedRedirectUrl: a URL for user denied your program/application's permission request.

callbackUrl: a URL for retrieve information from OAuth service provider (Web application requires, if your application is desktop application, your can assign this value with "oob").

Nov 17, 2011 at 10:54 AM


This was my understanding, but using Google authentication with app id = anonymous and secret id = anonymous always returns to callbackUrl whether user accepts or denies the authentication request. acceptedRedirectUrl and failedRedirectUrl do not seem to work as coded/configured in the web sample.


This is the same with Windows Live Id.

Nov 17, 2011 at 1:10 PM

This is confirmed by a search on source files:

Find all "AcceptedRedirectUrl", Subfolders, Find Results 1, "Entire Solution"
C:\Users\jlchereau\Desktop\EasyOAuth\EasyOAuth.Core\Configuration\OAuthConfigurationHelper.cs(52): public static void GetOAuthWebConfiguration(out string AcceptedRedirectUrl, out string FailedRedirectUrl)
C:\Users\jlchereau\Desktop\EasyOAuth\EasyOAuth.Core\Configuration\OAuthConfigurationHelper.cs(59): AcceptedRedirectUrl = oauthConfigurationSection.WebConfiguration.AcceptedRedirectUrl;
C:\Users\jlchereau\Desktop\EasyOAuth\EasyOAuth.Core\Configuration\OAuthConfigurationHelper.cs(64): AcceptedRedirectUrl = null;
C:\Users\jlchereau\Desktop\EasyOAuth\EasyOAuth.Core\Configuration\OAuthWebConfigurationElement.cs(11): [ConfigurationProperty("acceptedRedirectUrl", IsRequired = true)]
C:\Users\jlchereau\Desktop\EasyOAuth\EasyOAuth.Core\Configuration\OAuthWebConfigurationElement.cs(12): public string AcceptedRedirectUrl { get { return base["acceptedRedirectUrl"].ToString(); } }
C:\Users\jlchereau\Desktop\EasyOAuth\EasyOAuth.WebClient.Sample\Web.config(8): <web acceptedRedirectUrl="~/Accepted.aspx" failedRedirectUrl="~/Rejected.aspx" />
Matching lines: 6 Matching files: 3 Total files searched: 72






AcceptedRedirectUrl and FailedRedirectUrl are configured but not used in code.