示例#1
0
        public ActionResult ChallengeEmail(string nonce)
        {
            string appKey = null;
            var    user   = _profileService.ValidateChallenge(nonce, out appKey);

            if (user != null)
            {
                _userEventHandler.ConfirmedEmail(user);
                ApplicationRecord app = _applicationsService.GetApplicationByKey(appKey);
                if (app == null)
                {
                    return(RedirectToAction("ChallengeEmailSuccess"));
                }
                else
                {
                    if (!_detectMobileService.isMobileBrowser(Request.UserAgent))
                    {
                        return(RedirectToAction("ChallengeEmailSuccess"));
                    }
                    else
                    {
                        string protocol = _applicationsService.GetApplicationProtocol(app.Id);
                        return(Redirect(protocol + "challengeemailsuccess?user="******"ChallengeEmailFail"));
        }