Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 19, 2012 05:05 AM by BrockAllen
Dec 18, 2012 03:32 AM|LINK
I have an API which I use on mobile devices. So I wrote some code for users to Authenticate through Facebook using OAuthWebSecurity. After doing some decoupling and copying code from AccountController and this is what I have:
result = OAuthWebSecurity.VerifyAuthentication(facebookReturnUri);
I pass in the correct valid facebookRerurnUri and the result is always "NULL". There is no error attached
to it or any other useful information.
I was hoping if someone can please provide some insight on what might be going on here.
Dec 18, 2012 02:48 PM|LINK
I'm not sure the result can be null -- I'm looking thru the code and it always returns a valid result with the IsSuccessful to false if there is a problem.
Dec 18, 2012 04:31 PM|LINK
Is there a way to figure out why would it be false ? As there is no error which is returned. I know the passed Url is correct because I can manually extract the token and use it, that works.
Dec 18, 2012 04:42 PM|LINK
Well, since all that code is available on codeplex, you could always download it and debug into it :)
Dec 18, 2012 05:12 PM|LINK
Do you happen to know what is the project name ? I have tried looking for it as the OAuthWebSecurity class sits in Microsoft.Web.WebPages.OAuth.
Dec 18, 2012 05:32 PM|LINK
It's in Microsoft.Web.WebPages.OAuth:
Dec 19, 2012 04:43 AM|LINK
After doing further debugging, seems like the ProviderName is null and it's not available in context.
I'm not using this in Forms application but exposing SimpleMembershipProvider as a service, so is there
a way to set the correct provider.
Dec 19, 2012 05:05 AM|LINK
I think those names are hard-coded somewhere, so I bet if you tried "Facebook" you might get lucky. Otherwise dig thru the code a bit and find where they populate that list and where they get the keys from.