Developer forum

Forum » Templates » Autologin
Peter Terkildsen
Reply

I have this lame question about a feature that I thought would be absolutely simple to implement. However, it didn't work out as I hoped. :-/

I have created a login form in a Razor-template. The login submits the username and the password to a custom login, but the custom login creates a virtual Dynamicweb-user.

Now I'm trying to create an autologin-feature, and I thought I could just use the standard approach in Dynamicweb. So I implemented the following HTML:

                        <div class="checkbox">
                            <div style="display:none;">
                                <input type="hidden" value="true" name="DWExtranetUsernameRemember" id="DWExtranetUsernameRemember" />
                                <input type="hidden" value="true" name="DWExtranetPasswordRemember" id="DWExtranetPasswordRemember" />
                            </div>

                            <input value="true" type="checkbox" name="autologin" id="autologin">
                            <label for="autologin">Husk mig</label>
                            <a href="/Login.aspx?action=PasswordForm">Glemt adgangskode? </a>
                        </div>

However, it doesn't work. I've investigated the cookies being sent by Dynamicweb CMS, and it seems that there's no cookie being sent to the browser. I guess that the "AL=" is the autologin information? http://screencast.com/t/GXe3CkLR


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Peter

The login on this site uses the feature:

<form id="loginform" role="form" method="post" abp="6">
<input name="ID" type="hidden" =""="" abp="8">
<input name="DWExtranetUsernameRemember" type="hidden" value="True" abp="9">
<input name="DWExtranetPasswordRemember" type="hidden" value="True" abp="10">
<input name="username" class="form-control" id="username" style="width: 100% !important;" type="text" placeholder="Enter username" abp="13">
<input name="password" class="form-control" id="password" style="width: 100% !important;" type="password" placeholder="Enter password" abp="16">
<input name="Autologin" type="checkbox" checked="checked" value="True" abp="23">
<button class="btn btn-dw-primary pull-right" type="submit" abp="24">Sign in</button>
</form>

This is the form, and it should be very straight forward. AL is the autologin flag - yes or no.

 
Peter Terkildsen
Reply

Yup, I know. It should be really easy. :-)

I suspect it might be due to the custom login provider being used. I have set up everything exactly as you write in my template, so the cause of the problem is probably in the C#-code.

Sorry for wasting your time. :-/

 

You must be logged in to post in the forum