Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "huntethan89"

Is there any official way available to upgrade the version of ASPNET Zero?

Hi,

I tested same with console application. It is working in console application but not in this.

Hi,

The issue is that i want get data from google drive using ASP NET zero ( using Google SSO).

private static GoogleOAuth2AuthenticationOptions CreateGoogleAuthOptions() { var options = new GoogleOAuth2AuthenticationOptions { ClientId = ConfigurationManager.AppSettings["ExternalAuth.Google.ClientId"], ClientSecret = ConfigurationManager.AppSettings["ExternalAuth.Google.ClientSecret"]

		};
		options.Scope.Add("https://www.googleapis.com/auth/drive");
		return options;

	}

If i use normal code, it is working fine. i am able to login into the application, but if i add scope for google drive as shown in above code it gives NULL into login info in ExternalLoginCallback method as shown below.

public virtual async Task<ActionResult> ExternalLoginCallback(string returnUrl, string tenancyName = "") { returnUrl = NormalizeReturnUrl(returnUrl); var loginInfo = await _authenticationManager.GetExternalLoginInfoAsync(); ............ ............

Hi ,

I am using MVC 5.x & jQuery. ver 5.0

i am getting NULL var loginInfo = await _authenticationManager.GetExternalLoginInfoAsync();

it was already there.

Hi ,

Following is the error written in logs.txt

DEBUG 2018-01-11 13:42:52,966 [1 ] Abp.Owin.OwinUserTokenProviderAccessor - DataProtectionProvider has not been set yet.

Thanks

Hi,

public virtual async Task<ActionResult> ExternalLoginCallback(string returnUrl, string tenancyName = "") { returnUrl = NormalizeReturnUrl(returnUrl);

        **var loginInfo = await _authenticationManager.GetExternalLoginInfoAsync();**
        if (loginInfo == null)
        {
            return RedirectToAction("Login");
        }

        //Try to find tenancy name
        if (tenancyName.IsNullOrEmpty())
        {
            tenancyName = _tenancyNameFinder.GetCurrentTenancyNameOrNull();
            if (tenancyName.IsNullOrEmpty())
            {
                var tenants = await FindPossibleTenantsOfUserAsync(loginInfo.Login);
                switch (tenants.Count)
                {
                    case 0:
                        return await RegisterView(loginInfo);
                    case 1:
                        tenancyName = tenants[0].TenancyName;
                        break;
                    default:
                        return View("TenantSelection", new TenantSelectionViewModel
                        {
                            Action = Url.Action("ExternalLoginCallback", "Account", new { returnUrl }),
                            Tenants = tenants.MapTo&lt;List&lt;TenantSelectionViewModel.TenantInfo&gt;>()
                        });
                }
            }
        }

        var loginResult = await _logInManager.LoginAsync(loginInfo.Login, tenancyName);

        switch (loginResult.Result)
        {
            case AbpLoginResultType.Success:
                await SignInAsync(loginResult.User, loginResult.Identity, true);
                return Redirect(returnUrl);
            case AbpLoginResultType.UnknownExternalLogin:
                return await RegisterView(loginInfo, tenancyName);
            default:
                throw _abpLoginResultTypeHelper.CreateExceptionForFailedLoginAttempt(loginResult.Result, loginInfo.Email ?? loginInfo.DefaultUserName, tenancyName);
        }
    }

When it came to above method, it is giving null to login info in highlighted line.

Hi,

Is there any other possibility to implement this?

Thanks

Thanks for the reply! Can you please explain what does this do?

Showing 91 to 100 of 122 entries