hi
My goal is to use Angular Login page and Microsoft auth. Once it runs fine I can disable user and password authentication.
You should use the authorization code flow in this case.
https://abp.io/docs/latest/framework/ui/angular/authorization#authorization-code-flow
I will ask our angular team, I think it doesn't support the external/social login in password flow.
Looks your DbContext no problem.
What happens if you run the dotnet ef migrations add NewTest command?
ok, no problem, I will share the code again.
hi
Doesn't rename files / folders so you still have to manually rename project folder, and the.csproj file name as a minumum before you can open, build and run the project. And still lots of other files still have name of old project
This is inevitable. We will consider providing a tool to rename files and folders in the future.
Breaks the menu titles as shown below - Home becomes Menu:Home for some reason.
Please check the localized code, it might be a problem with the JONS file path.
hi
You can open your whole project in VS code. then search and replace globally.
hi
With previous code Homepage Login button redirects on my Angular account/login page (in which there is no "Login with Microsoft" button):
You are using the password grant flow of oAuth2 to get the token. so there is no external/social login button.
Because you have to enter the username and password to sign in.
https://oauth.net/2/grant-types/ https://www.oauth.com/oauth2-servers/access-tokens/password-grant/ https://www.oauth.com/oauth2-servers/access-tokens/authorization-code-request/
hi
The project name may be in cs, js, csthml, csproj, etc. files. , we can't use a variable for unified management.
We have to search and rename globally.
Sorry for that.
hi
There is no shortcut, you can search and rename globally.
Thanks.
hi
You can add a new class in AuthServer to customize the LoginPage.
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Owl.reCAPTCHA;
using Volo.Abp.Account.ExternalProviders;
using Volo.Abp.Account.Public.Web;
using Volo.Abp.Account.Public.Web.Pages.Account;
using Volo.Abp.Account.Security.Recaptcha;
using Volo.Abp.Account.Web.Pages.Account;
using Volo.Abp.DependencyInjection;
using Volo.Abp.OpenIddict;
using Volo.Abp.Security.Claims;
namespace MyCompanyName.MyProjectName.Pages;
[IgnoreAntiforgeryToken(Order = 1001)]
[ExposeServices(typeof(OpenIddictSupportedLoginModel), typeof(LoginModel))]
public class MyLoginPage : OpenIddictSupportedLoginModel
{
public MyLoginPage(
IAuthenticationSchemeProvider schemeProvider,
IOptions<AbpAccountOptions> accountOptions,
IAbpRecaptchaValidatorFactory recaptchaValidatorFactory,
IAccountExternalProviderAppService accountExternalProviderAppService,
ICurrentPrincipalAccessor currentPrincipalAccessor,
IOptions<IdentityOptions> identityOptions,
IOptionsSnapshot<reCAPTCHAOptions> reCaptchaOptions,
AbpOpenIddictRequestHelper openIddictRequestHelper)
: base(schemeProvider, accountOptions, recaptchaValidatorFactory, accountExternalProviderAppService, currentPrincipalAccessor, identityOptions, reCaptchaOptions, openIddictRequestHelper)
{
}
}