Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login customisation #121

Open
Viktor-Mihalenko opened this issue Dec 3, 2024 · 1 comment
Open

Login customisation #121

Viktor-Mihalenko opened this issue Dec 3, 2024 · 1 comment

Comments

@Viktor-Mihalenko
Copy link

I am using example 7 and want to allow registration only via the “Sign up a new tenant” option, not through the standard ASP.NET library.
Additionally, I would like to adjust the standard registration routine so that, when people try to access it, they are always redirected to the login page, and I would also like to hide the register button on the login page. Since the login and register pages were not present in the project, I added them using the following command:

dotnet aspnet-codegenerator identity -dc ApplicationDbContext --files "Account.Register;Account.Login;Account.ResetPassword"

The issue I’m facing now is that no matter what I modify, the application still doesn’t use the pages I customized. Instead, it keeps using the default ones that were already in place. How can I ensure that my application uses my pages and follows my custom routines

@JonPSmith
Copy link
Owner

Hi @Viktor-Mihalenko,

I have never used the dotnet aspnet-codegenerator so I can't comment on that.

I should say that the AuthP library doesn't have any ASP.NET Core frontend features, e.g. pages, logins, etc. apart from AuthP code in "Sign up for a new tenant" and the "Invite new user feature" features. Both of these features uses AuthP's Add New User adapter to work with different types of logins.

You might find the article Three ways to securely add new users to an application using the AuthP library which shows different ways for a new user can register to an AuthP app.

I would also suggest you try things out on Example3 as its the simplest multi-tenant applications first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants