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 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);
}
);
Does it mean that we need to add @ctrl/tinycolor to package.json in future versions
Has the issue been fixed?
hi Please advise the last version number that is no longer maintained If the latest is not available, I will give up updating the module
This did not meet expectations. Maybe my problem is this is a new requirement. If a user login into their current account, they want to be able to provide an entry point to bind to an external provider
For example, in the system, there is a user@admin.com, which needs to be bound to a microsoft account. not register account
I think CurrentPrincipalAccessorBase
increase async
can be solved, like this
protected abstract Task<ClaimsPrincipal> GetClaimsPrincipal();