Hurry Up, Ends March 14!

Activities of "464199480"

Hi ! I applied this piece of code, but the issue still remained unsolved.

Could you copy the code of Microsoft.AspNetCore.Authentication.MicrosoftAccount? The ClientSecret obtained in the code is encrypted content.

[Dependency(ReplaceServices = true)] [ExposeServices(typeof(ExternalProviderSettingsHelper))] public class MyExternalProviderSettingsHelper : ExternalProviderSettingsHelper { private readonly ISettingDefinitionManager _settingDefinitionManager; private readonly ISettingEncryptionService _settingEncryptionService; private readonly ICurrentTenant _currentTenant; private readonly AbpExternalProviderOptions _externalProviderOptions; private readonly ISettingManager _settingManager; private readonly IJsonSerializer _jsonSerializer; public MyExternalProviderSettingsHelper( ICurrentTenant currentTenant, IOptions<AbpExternalProviderOptions> externalProvidersOptions, ISettingManager settingManager, IJsonSerializer jsonSerializer, IStringEncryptionService stringEncryptionService, ISettingDefinitionManager settingDefinitionManager, ISettingEncryptionService settingEncryptionService) : base(currentTenant, externalProvidersOptions, settingManager, jsonSerializer, stringEncryptionService) { _settingDefinitionManager = settingDefinitionManager; _settingEncryptionService = settingEncryptionService; _currentTenant = currentTenant; _externalProviderOptions = externalProvidersOptions.Value; _settingManager = settingManager; _jsonSerializer = jsonSerializer; }

Using your approach will result in the clientSecret configured by tenant in the setting being ineffective.

Ok. How to solve the problem of failed login from External provider now? The Client secrets obtained by my provider are encrypted.

Why is it necessary to encrypt the Client secret? This leads to a very serious disaster in the update of the Release environment, and this is not mentioned in the migration instructions.

Got it

Is binding to existing username not currently supported when logging in via SSO?

Need to log in with a username for SSO binding?

Angular environment that can be reproduced

const oAuthConfig = {
  issuer: 'http://localhost:44372/',
  redirectUri: baseUrl,
  clientId: 'BookStore_App',
  responseType: 'password', // change to password
  scope: 'offline_access BookStore',
  requireHttps: false,
  impersonation: {
    userImpersonation: true,
    tenantImpersonation: true,
  },
};

I confirm that the external provider is enabled

But still not displayed

External providers have come out

I used 9.0.4

But there is still no documentation of external logins

I seem to have spotted the issue

I create this via abp new Acme.Demo-u angular

Angular templates do not appear to have external login associations

Hi

Which version to use?

I used when 9.0.0 to create an empty template, but no Account External Provider

The template has confirmed that SSO is enabled

  context.Services.AddAuthentication()
      .AddGoogle(GoogleDefaults.AuthenticationScheme, options =>
      {
          options.ClaimActions.MapJsonKey(AbpClaimTypes.Picture, "picture");
      })
      .WithDynamicOptions<GoogleOptions, GoogleHandler>(
          GoogleDefaults.AuthenticationScheme,
          options =>
          {
              options.WithProperty(x => x.ClientId);
              options.WithProperty(x => x.ClientSecret, isSecret: true);
          }
      )
      .AddMicrosoftAccount(MicrosoftAccountDefaults.AuthenticationScheme, options =>
      {
          //Personal Microsoft accounts as an example.
          options.AuthorizationEndpoint = "https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize";
          options.TokenEndpoint = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";

          options.ClaimActions.MapCustomJson("picture", _ => "https://graph.microsoft.com/v1.0/me/photo/$value");
          options.SaveTokens = true;
      })
      .WithDynamicOptions<MicrosoftAccountOptions, MicrosoftAccountHandler>(
          MicrosoftAccountDefaults.AuthenticationScheme,
          options =>
          {
              ////options.WithProperty(x => x.ClientId);
              options.WithProperty(x => x.ClientSecret, isSecret: true);
          }
      )
      .AddTwitter(TwitterDefaults.AuthenticationScheme, options =>
      {
          options.ClaimActions.MapJsonKey(AbpClaimTypes.Picture, "profile_image_url_https");
          options.RetrieveUserDetails = true;
      })
      .WithDynamicOptions<TwitterOptions, TwitterHandler>(
          TwitterDefaults.AuthenticationScheme,
          options =>
          {
              options.WithProperty(x => x.ConsumerKey);
              options.WithProperty(x => x.ConsumerSecret, isSecret: true);
          }
      );
Showing 1 to 10 of 26 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 07, 2025, 04:57