Remember Me Button
r

rasmus_rasmussen

about 2 years ago
Hello. I have implemented the member login and register functionality from the Umbraco Docs (Link to docs). The docs didn't show the remember me button, but it is present when you use the Macro snipit. But no matter how many docs or forum posts I read, I can't find a way to change the default timeout for the remember me button. Code below shows the Macro snippet that Umbraco creates.
cs
@using (Html.BeginUmbracoForm<UmbLoginController>(
    "HandleLogin", new { RedirectUrl = loginModel.RedirectUrl })) {
 <h4>Log in with a local account.</h4>
        <hr />
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <div class="mb-3">
            <label asp-for="@loginModel.Username" class="form-label"></label>
            <input asp-for="@loginModel.Username" class="form-control" />
            <span asp-validation-for="@loginModel.Username" class="form-text text-danger"></span>
        </div>
        <div class="mb-3">
            <label asp-for="@loginModel.Password" class="form-label"></label>
            <input asp-for="@loginModel.Password" class="form-control" />
            <span asp-validation-for="@loginModel.Password" class="form-text text-danger"></span>
        </div>
        <div class="mb-3 form-check">
            <input asp-for="@loginModel.RememberMe" class="form-check-input">
            <label asp-for="@loginModel.RememberMe" class="form-check-label">
                @Html.DisplayNameFor(m => loginModel.RememberMe)
            </label>
        </div>
        <button type="submit" class="btn btn-primary">Log in</button>
    }
It's the
<input asp-for="@loginModel.RememberMe" class="form-check-input">
I'm looking at. EDIT: I have seen that you can create a global cookie in appsettings, but I need remember me to be able to be turned on or off. EDIT: I'm using
UmbAlternativeLoginController
What I would like to ask is, how do I change the default timeout for the member that is signing in, with the remember me button?