emonarafat / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

Login Return URL Not Working with ASP.NET Forms authentication #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Login using ASP.NET Forms authentication
2. Browse to restricted area of site
3. Request contacts from Facebook or Google, etc.
4. Since I am not logged into Facebook I create a SocialAuthUser
5. I login the SocialAuthUser with a redirect url that is inside the restricted 
part of the site.
6. I get redirected to my default home page instead of the redirect url.

What is the expected output? What do you see instead?
See step 6

What version of the product are you using? On what operating system?
SocialAuth-net-2.0beta

Please provide any additional information below.
I followed instructions in the integration option 3 to allow use of 
SocialAuth-net with ASP.Net Forms authentication but still having problem. 
Removed all Forms authentication restrinctions (changed <deny users="?"/> to 
<allow users="*"/> in restricted part of site).

Original issue reported on code.google.com by djrichar...@gmail.com on 2 Feb 2012 at 2:21

GoogleCodeExporter commented 9 years ago
Hi,

I understand you are calling Login Method by passing return URL as argument 
using Forms Authentication mode. However, I'd like to inform tat current logic 
is that if FormsAuthentication is used, SocialAuth.NET doesn't alter any 
redirection behavior of ASP.NET engine and simply calls 
FormsAuthentication.RedirectFromLoginPage()

Which means, if there is a ReturnUrl in querystring, FormsAuthentication engine 
will use that otherwise default url as specified in Forms Authentication 
defualt URL configuration is used. 

However, this is not an issue but it was our initial thought to keep ASP.NET 
FormsAuthentication intact. However, this behavior has often been logged as 
defect and we are considering need to revisit out design. But at the moment 
this is the way it works.

Please let us know if this reply helps you.
thanks,
Deepak

Original comment by daggar...@brickred.com on 6 Mar 2012 at 8:04

GoogleCodeExporter commented 9 years ago
The same problem for me but there is no return Url in requested query string. 
What's the reason?

Original comment by cvacanga...@gmail.com on 10 Apr 2012 at 12:45

GoogleCodeExporter commented 9 years ago
Hi,

Since this issue is more of our design choice and not actually a big, we're 
closing this issue as of now. Should you still need any help for this, please 
feel absolutely free to re-open this issue.

Issue URL: http://code.google.com/p/socialauth-net/issues/detail?id=59

@cvacangaran2k: ReturnUrl should appear automatically when a page is requested 
but it needs authentication. You may check the same in our demo app. Clicking 
on any link which needs authentication appends ReturnUrl automatically. In 
FormsAuthentication mode, we're not doing this. Its being done automatically by 
.NET framework.

regards,
Deepak

Original comment by daggar...@brickred.com on 22 Apr 2012 at 12:15