public static void Handler(LoginManagerLoginResult result, NSError error, ISocialAuth interactor, LoginManager loginManager)
        {
            _loginManager = loginManager;
            _interactor   = interactor;

            if (error != null)
            {
                _interactor.OnError(error.LocalizedDescription, ESocialType.Facebook);
            }
            else if (result.IsCancelled)
            {
                _interactor.OnCancel(ESocialType.Facebook);

                _loginManager.LogOut();
                var r = new Facebook.CoreKit.GraphRequest("me/permissions", null, "DELETE");
                r.Start((connection, result1, error1) => {
                    Console.WriteLine("GraphRequest");
                });
            }
            else
            {
                var token = result.Token.TokenString;
                _interactor.OnSuccess(token, ESocialType.Facebook);
            }
        }
        public AuthController(IJwtHandlerService jwtService, ISocialAuth socialAuth, IConfigProvider configProvider)
        {
            userRepository = new UserRepository(jwtService, configProvider);

            this.configProvider = configProvider;
            this.socialAuth     = socialAuth;
        }
 public RegistrationController(IJwtHandlerService jwtHandler, IConfigProvider configProvider, ISocialAuth socialAuth, ITokenCleaner cleaner, ISmtpClient smtpClient)
 {
     userRepository  = new UserRepository(jwtHandler, configProvider);
     this.smtpClient = smtpClient;
     this.cleaner    = cleaner;
     this.socialAuth = socialAuth;
 }
Exemple #4
0
 public SplashViewModel(ISession session,
                        ISocialAuth authentication,
                        ICache cache)
 {
     _session            = session;
     _authentication     = authentication;
     _caching            = cache;
     AuthenticateCommand = new DelegateCommand <string>(async(type) => await Authenticate(type));
     Task.Run(async() => await Init());
 }
Exemple #5
0
 public FacebookCallback(ISocialAuth interactorAuth)
 {
     _interactorAuth = interactorAuth;
 }