emonarafat / socialauth-net

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

User denied login ends up in server error #89

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
What steps will reproduce the problem?
User denied login permission at provider confirmation page.
Returned to local validate.sauth page and throws an error
http://localhost/BGIWebsite2/SocialAuth/validate.sauth?denied=mdOQoMu0Yd5rQkfRcp
JJcMnIVnlApIfTZnwDyVUdYbE

What is the expected output? What do you see instead?
I suggest validate.sauth to handle this error properly, so we don't end up with 
ugly Server Error like the following:

Server Error in '/BGIWebsite2' Application.
--------------------------------------------------------------------------------

User denied access to share his details with this application 
Description: An unhandled exception occurred during the execution of the 
current web request. Please review the stack trace for more information about 
the error and where it originated in the code. 

Exception Details: Brickred.SocialAuth.NET.Core.OAuthException: User denied 
access to share his details with this application

Source Error: 

An unhandled exception was generated during the execution of the current web 
request. Information regarding the origin and location of the exception can be 
identified using the exception stack trace below.  

Stack Trace: 

[OAuthException: User denied access to share his details with this application]
   Brickred.SocialAuth.NET.Core.OAuth1_0a.HandleUserReturnCallback(QueryParameters responseCollection) +426
   Brickred.SocialAuth.NET.Core.OAuth1_0a.LoginCallback(QueryParameters responseCollection, Action`1 AuthenticationCompletionHandler) +57
   Brickred.SocialAuth.NET.Core.Wrappers.TwitterWrapper.LoginCallback(QueryParameters responseCollection, Action`1 AuthenticationHandler) +87
   Brickred.SocialAuth.NET.Core.BusinessObjects.SocialAuthUser.LoginCallback(String response) +432
   Brickred.SocialAuth.NET.Core.CallbackHandler.ProcessRequest(HttpContext context) +969
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET 
Version:4.0.30319.272 

Regards,
Kelvin

Original issue reported on code.google.com by kelvin1...@gmail.com on 16 Jun 2012 at 11:45

GoogleCodeExporter commented 9 years ago
Hi 
Thanks for your input. We already have this in roadmap. But with a request 
actually coming in, You'll have it in next release. Thanks for highlighting 
this. For now, try catch please :)

Deepak

Original comment by daggar...@brickred.com on 16 Jun 2012 at 6:04

GoogleCodeExporter commented 9 years ago

Original comment by daggar...@brickred.com on 19 Jun 2012 at 3:42

GoogleCodeExporter commented 9 years ago
This is already resolved.
2 changes have been made to SocialAuth to resolve this:
1. New exception type  UserDeniedException is thrown when a user cancels 
permission (and error url wasn't define in login)
2.  If error url was defined in login, exception is caught and redirection is 
done to error url with details in querystring.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 24 Jan 2013 at 7:19