Käyttäjän "pvala" toiminnot

Yes, it's working now. But there is one more issue, i.e., I am not able to use the bootstrap icons on my Login page. We have eye slash icon to show the password. But that is not showing up on the UI.

Yes, it's there

I already have done changes to the global-styles.css file under the Auth project but it's not reflecting. Do I have to provide any reference of the global stylesheet in my cshtml file?

I tried this solution, and it's redirecting the user directly into it's profile. However, because we have put the condition that if the user is not authenticated, it should simply be redirected to the login page, I won't be able to use the landing page of the angular application.

As soon as, I try to access this page, it will redirect the user to the login page and I don't want that. I'll need that page in use.

Isn't there any way we can configure it from the Auth Server side? So that it directly redirects the user into it's profile as soon as the login button is clicked? Please suggest.

But will it work on the Auth Server as well? Because our Auth Server is an MVC project, separate from angular.

yCheck the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

We have a global-styles.css file to apply customized css in our applicaton. But it's not showing any impact on the Auth Server project that we have. It's not applying there. Can you tell us how can we achieve that?

  • ABP Framework version: v7.3.2
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I have done some customization in my Auth-Server project (MVC). When I enter my user credentials and click on Login button, it redirects me to my angular application (I have done customization for it in the Login.cshtml.cs file, on OnPostAsync method I am returning my Angular app's url).

ConfigValues.AngularAppUrl holds my angular app url

        return Redirect(ConfigValues.AngularAppUrl);

The problem is, when I click on the Login button, it does redirect to the angular app, but it will not be logged in as a user but rather just the outside page of it. And once and only when I click on the login icon on my angular application page, then it will log in as a user (see the flow below).

I want a way where on clicking the Login button in the Auth Server (first image), I should be redirected to the angular application with user logged in.

This will work, but it's basically calling the API again to get the details of the input fields, and that doesn't sound great. Can you give me something else? Something which can hold the values of the variable till the page is refreshed or the instance of the class is destroyed.

If you run this, now you will see that it works and it will hold the values, but here I have done a work around. I have created a separate input field for all the properties and I am keeping them hidden for now, because that's the only way I could find in order to hold the values. I'd like something more proper to do that.

For example :

                        <input type="hidden" asp-for="@Model.Fields[i].Index" />
                        <input type="hidden" asp-for="@Model.Fields[i].Title" />
                        <input type="hidden" asp-for="@Model.Fields[i].IsRequired" />
                        <input type="hidden" asp-for="@Model.Fields[i].HasOtherOption" />
                        <input type="hidden" asp-for="@Model.Fields[i].QuestionType" />
                        <input type="hidden" asp-for="@Model.Fields[i].Choices" />

Yeah, here you go.

@page @using Microsoft.AspNetCore.Mvc.Localization @using Volo.Abp.Account.Localization @using Volo.Abp.Account.Public.Web.Security.Recaptcha @using Volo.Abp.Account.Settings @using Volo.Abp.Settings @model G1.health.AuthServer.Pages.Account.RegisterModel @using Volo.Forms; @inject IHtmlLocalizer<AccountResource> L @inject Volo.Abp.AspNetCore.Mvc.UI.Layout.IPageLayout PageLayout @inject ISettingProvider SettingProvider @{ PageLayout.Content.Title = L["Register"].Value; var reCaptchaVersion = await SettingProvider.GetAsync<int>(AccountSettingNames.Captcha.Version); }

@if (!Model.LocalLoginDisabled) { @section scripts { <abp-script-bundle name="@typeof(G1.health.AuthServer.Pages.Account.RegisterModel).FullName"> <abp-script src="/Pages/Account/Register.js" /> </abp-script-bundle>

@if (Model.UseCaptcha)
    {
        if (reCaptchaVersion == 3)
        {
            &lt;recaptcha-script-v3 /&gt;
            &lt;recaptcha-script-v3-js action=&quot;register&quot; callback=&quot;(function(){$(&#39;#@RecaptchaValidatorBase.RecaptchaResponseKey&#39;).val(token)})&quot; /&gt;
        }
        else
        {
            &lt;recaptcha-script-v2 /&gt;
        }
    }
}

&lt;style&gt;
    .hidden-scroll::-webkit-scrollbar {
        display: none;
    }

    .hidden-scroll{
        height: 500px;
        overflow: scroll
    }
&lt;/style&gt;

&lt;div class=&quot;account-module-form hidden-scroll&quot;&gt;
    &lt;h5 class=&quot;mb-2&quot;&gt;@L["AlreadyRegistered"] &lt;a class=&quot;text-decoration-none&quot; href=&quot;@Url.Page(&quot;./Login&quot;, new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})&quot;&gt;@L["Login"]&lt;/a&gt;&lt;/h5&gt;
    &lt;form method=&quot;post&quot;&gt;


        @if (Model.UseCaptcha)
        {
            &lt;div class=&quot;mb-2&quot;&gt;
                &lt;input type=&quot;hidden&quot; name=&quot;@RecaptchaValidatorBase.RecaptchaResponseKey&quot; id=&quot;@RecaptchaValidatorBase.RecaptchaResponseKey&quot; /&gt;
            &lt;/div&gt;
        }

        @if (!Model.IsExternalLogin)
        {
            &lt;div class=&quot;form-floating mb-2&quot;&gt;
                &lt;input asp-for=&quot;Input.UserName&quot; type=&quot;text&quot; class=&quot;form-control&quot; placeholder=&quot;name@example.com&quot; auto-focus=&quot;true&quot;&gt;
                @Html.LabelFor(m => m.Input.UserName)
            &lt;/div&gt;
        }

        &lt;div class=&quot;form-floating mb-2&quot;&gt;
            &lt;input asp-for=&quot;Input.EmailAddress&quot; type=&quot;email&quot; class=&quot;form-control&quot; placeholder=&quot;name@example.com&quot; auto-focus=&quot;true&quot;&gt;
            @Html.LabelFor(m => m.Input.EmailAddress)
        &lt;/div&gt;


        @if (!Model.IsExternalLogin)
        {
            &lt;div class=&quot;form-floating mb-2&quot;&gt;
                &lt;input asp-for=&quot;Input.Password&quot; id=&quot;password-input&quot; type=&quot;password&quot; class=&quot;form-control&quot; placeholder=&quot;Password&quot;&gt;
                @Html.LabelFor(m => m.Input.Password)
                &lt;i id=&quot;PasswordVisibilityButton&quot; class=&quot;bi bi-eye-slash show-pass-icon&quot; data-bs-toggle=&quot;tooltip&quot; data-bs-placement=&quot;top&quot; data-bs-html=&quot;true&quot; aria-label=&quot;@L[&quot;ShowPassword&quot;]&quot; data-bs-original-title=&quot;@L[&quot;ShowPassword&quot;]&quot;&gt;&lt;/i&gt;
                &lt;i id=&quot;capslockicon&quot; class=&quot;bi bi-capslock caps-lock-icon&quot; style=&quot;display: none;&quot; data-bs-toggle=&quot;tooltip&quot; data-bs-placement=&quot;top&quot; data-bs-html=&quot;true&quot; aria-label=&quot;&lt;i class=&#39;bi bi-exclamation-circle&#39;&gt;&lt;/i&gt; @L["CapsLockOn"]!" data-bs-original-title="&lt;i class=&#39;bi bi-exclamation-circle&#39;&gt;&lt;/i&gt; @L["CapsLockOn"]!">&lt;/i&gt;
            &lt;/div&gt;
        }

        @for (int i = 0; i &lt; Model.Fields.Count; i++)
        {
            switch (Model.Fields[i].QuestionType)
            {
                case QuestionTypes.ShortText:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; type=&quot;text&quot; class=&quot;form-control&quot; auto-focus=&quot;true&quot;&gt;
                        @Html.Label(Model.Fields[i].Title)
                    &lt;/div&gt;
                    break;

                case QuestionTypes.ParagraphText:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; type=&quot;text&quot; class=&quot;form-control&quot; auto-focus=&quot;true&quot;&gt;
                        @Html.Label(Model.Fields[i].Title)
                    &lt;/div&gt;
                    break;

                case QuestionTypes.ChoiceMultiple:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].HasOtherOption&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Choices&quot; /&gt;
                        &lt;lable&gt;@Model.Fields[i].Title&lt;/lable&gt;
                        &lt;abp-radio asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; asp-items=&quot;@Model.Fields[i].Choices&quot; /&gt;
                    &lt;/div&gt;
                    break;

                case QuestionTypes.Checkbox:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].HasOtherOption&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Choices&quot; /&gt;
                        @foreach (var choice in Model.Fields[i].Choices)
                        {
                            &lt;abp-input asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; label=&quot;@choice.Value&quot; type=&quot;checkbox&quot; /&gt;
                        }
                    &lt;/div&gt;
                    break;

                case QuestionTypes.DropdownList:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].HasOtherOption&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Choices&quot; /&gt;
                        &lt;abp-select asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; label=&quot;@Model.Fields[i].Title&quot; asp-items=&quot;@Model.Fields[i].Choices&quot; /&gt;
                    &lt;/div&gt;
                    break;

                case QuestionTypes.MultipleSelect:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].HasOtherOption&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Choices&quot; /&gt;
                        &lt;abp-select asp-for=&quot;@Model.Fields[i].Answers&quot; required=&quot;@Model.Fields[i].IsRequired&quot; label=&quot;@Model.Fields[i].Title&quot; asp-items=&quot;@Model.Fields[i].Choices&quot; /&gt;
                    &lt;/div&gt;
                    break;

                case QuestionTypes.Calendar:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; type=&quot;datetime-local&quot; class=&quot;form-control&quot; auto-focus=&quot;true&quot; /&gt;
                        @Html.Label(Model.Fields[i].Title)
                    &lt;/div&gt;
                    break;

                case QuestionTypes.Date:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; type=&quot;date&quot; class=&quot;form-control&quot; auto-focus=&quot;true&quot;&gt;
                        @Html.Label(Model.Fields[i].Title)
                    &lt;/div&gt;
                    break;

                case QuestionTypes.Time:
                    &lt;div class=&quot;form-floating mb-2&quot;&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Index&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].Title&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].IsRequired&quot; /&gt;
                        &lt;input type=&quot;hidden&quot; asp-for=&quot;@Model.Fields[i].QuestionType&quot; /&gt;
                        &lt;input asp-for=&quot;@Model.Fields[i].Answer&quot; required=&quot;@Model.Fields[i].IsRequired&quot; type=&quot;time&quot; class=&quot;form-control&quot; auto-focus=&quot;true&quot;&gt;
                        @Html.Label(Model.Fields[i].Title)
                    &lt;/div&gt;
                    break;
            }
        }

        @if (reCaptchaVersion == 2)
        {
            &lt;recaptcha-div-v2 callback=&quot;(function(){$(&#39;#@RecaptchaValidatorBase.RecaptchaResponseKey&#39;).val(token)})&quot; /&gt;
        }

        &lt;div class=&quot;d-grid gap-2&quot;&gt;
            &lt;abp-button button-type=&quot;Primary&quot; type=&quot;submit&quot; class=&quot;mt-2 mb-3&quot;&gt;@L["Register"]&lt;/abp-button&gt;
        &lt;/div&gt;
    &lt;/form&gt;
&lt;/div&gt;

}

Näytetään 11 - 20/59 tietueesta
Made with ❤️ on ABP v8.2.0-preview Updated on maaliskuuta 25, 2024, 15.11