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

add authentication and authorization to Masa.Template #2260

Open
OmidAtaei1984 opened this issue Nov 23, 2024 · 3 comments
Open

add authentication and authorization to Masa.Template #2260

OmidAtaei1984 opened this issue Nov 23, 2024 · 3 comments

Comments

@OmidAtaei1984
Copy link

OmidAtaei1984 commented Nov 23, 2024

Hello. Please add authentication and authorization to Masa.Template, especially to blazor web app. Also, provide the ability to run blazor with https profile. In addition, if a program is created as a Blazor web app through dotnet new and its render mode is Server and its Interactive Mode is Global, then in forms related to authentication, such as login or register, if mform or mtextfield is used, it is not possible to use bind-value controls and an error occurs.Thanks

@capdiem
Copy link
Contributor

capdiem commented Nov 23, 2024

@OmidAtaei1984 Thank you for reaching out. Currently, Masa.Template does not have a built-in authentication system for Blazor templates, but you can first create a project with authentication using the official dotnet CLI, and then update your project according to our documentation.

@capdiem capdiem added project/template type/enhancement New feature or request labels Nov 23, 2024
@capdiem capdiem added this to the 1.9.0 Planning milestone Nov 23, 2024
@OmidAtaei1984
Copy link
Author

OmidAtaei1984 commented Nov 24, 2024

Hi. I created a Blazor webapp according to the attached image and replaced the login form controls in the account section with Masa.Blazor controls. When submitting the form, an error message is displayed as shown in the attached image. It should be noted that MTextField and MCheckbox controls are also not working due to the login page has no interactivity mode.
Screenshot_20241124_085921
Screenshot_20241124_114504
Screenshot_20241124_114538
Screenshot_20241124_114607
Screenshot_20241124_114651
Screenshot_20241124_114713
Screenshot_20241124_130914

@capdiem
Copy link
Contributor

capdiem commented Nov 25, 2024

@OmidAtaei1984 I can reproduce your issue, but I cannot provide a suitable solution. The logic for assigning values to the input in MTextField relies on JavaScript rather than the value attribute, so it can only be used during interactions. We may change this logic at some point in the future, but not in the near term. For non-interactive forms, it's best to use the native form or the EditForm and its Input components provided by Blazor. The issue of inconsistent UI can only be resolved through custom CSS.

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

No branches or pull requests

2 participants