Clancey / SimpleAuth

The Simplest way to Authenticate and make Rest API calls in .Net
Apache License 2.0
171 stars 48 forks source link

click cancel when logging into facebook #86

Closed ghost closed 5 years ago

ghost commented 5 years ago

if user clicks cancel button on facebook login app crashes.

image

stack trace indicates its related to SimpleAuth at SimpleAuth.OAuthApi+d32.MoveNext () [0x003e1] in <0974b7af290e47ccb34468bb809b9a36>:0 --- End of stack trace from previous location where exception was thrown --- at SimpleAuth.AuthenticatedApi+d15.MoveNext () [0x000f7] in <0974b7af290e47ccb34468bb809b9a36>:0 --- End of stack trace from previous location where exception was thrown --- at eShopOnContainers.Core.ViewModels.Artboard3ViewModel+d__6.MoveNext () [0x00046] in /Users/michaelmcdonogh/Documents/GIT/XamaratorAgent_MasterTemplate/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/General/Artboard3ViewModel.cs:40 --- End of stack trace from previous location where exception was thrown --- at eShopOnContainers.Core.ViewModels.Artboard3ViewModel+d3.MoveNext () [0x00020] in /Users/michaelmcdonogh/Documents/GIT/XamaratorAgent_MasterTemplate/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/General/Artboard3ViewModel.cs:33 --- End of stack trace from previous location where exception was thrown --- at eShopOnContainers.Core.ViewModels.Artboard3ViewModel+<b1_0>d.MoveNext () [0x0001f] in /Users/michaelmcdonogh/Documents/GIT/XamaratorAgent_MasterTemplate/src/Mobile/eShopOnContainers/eShopOnContainers.Core/ViewModels/General/Artboard3ViewModel.cs:12 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1023 at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/Foundation/NSAction.cs:178 --- End of stack trace from previous location where exception was thrown --- at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIApplication.cs:79 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.2.1.13/src/Xamarin.iOS/UIKit/UIApplication.cs:63 at eShopOnContainers.iOS.Application.Main (System.String[] args) [0x00001] in /Users/michaelmcdonogh/Documents/GIT/XamaratorAgent_MasterTemplate/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Main.cs:12

Clancey commented 5 years ago

This is by design. You should wrap the login in a try catch. That way your app can decide if login is required or not.