Example #1
0
        public async Task <IActionResult> HandleRedirect(string returnUrl)
        {
            if (returnUrl.IsNullEmptyOrWhiteSpace())
            {
                returnUrl = ApplicationEngine.RouteUrl(RouteNames.Home);
            }
            var request = await GoogleHelper.CreateConnectedAccountRequestAsync();

            if (_connectionAccountant.Connect(request))
            {
                return(Redirect(returnUrl));
            }
            return(RedirectToRoute(RouteNames.Login));
        }