public LoginEndPoint GetLoginEndPoint(string callbackUrl) { var stateManager = new LoginStateManager(); var authorizationUrl = GetAuthenticationUri(_provider, callbackUrl, stateManager, _profileProperties); authorizationUrl.Wait(); return new LoginEndPoint {StateCode = stateManager.StateCode, Uri = authorizationUrl.Result.AbsoluteUri}; }
public Profile ProcessLogin(string callbackUrl, string responseUrl, string stateCode) { var stateManager = new LoginStateManager {StateCode = stateCode}; var response = Login.GetProfile(_provider, new Uri(responseUrl), callbackUrl, stateManager, _profileProperties); response.Wait(); if(response.IsFaulted || response.Result.UniqueID == null) throw new System.Exception("Failed to get profile"); return response.Result; }