Developer forum
E-mail notifications
Auto-login functionality in Extranet
It's possible on DW backend, and should also be possible in extranet module.
Replies
Just implemented and it will be part of the next service release, 19.0.1.0, at the end of this month.
If save username and password is checked, and a new checkbox (name=autologin value=true) is also checked, Dynamicweb will create a cookie valid for 30 days with these information. When the user returns to the site (using same host and domain name) he will be logged in automatically and the cookie is renewed for another 30 days.
The autologin runs on first pageview - no matter if that page is protected or not.
To reset the autologin cookie allowing for another user to be able to login, call /Admin/Public/ExtranetLogoff.aspx.
Attached a template with a new checkbox for autologin.
That was quick. Hadn't expected that fast - and positive response.
Thanks...
Rune
Hi,
I tried to implement this but the tags are not parsed when I try to have the loginbox i a pagetemplate. Can it be done somehow?
Below is my versioninformation.
Regards / Aki
On a page properties under security, you can choose a extranet login template - that is where it should be selected.
Where and how to set the template
http://manual.net.dynamicweb.dk/Default.aspx?ID=6646
And the tags
http://templates.dynamicweb.dk/TemplateTags/Dynamicweb-template-tags/Module-tags/Extranet/Intranet/Login.aspx
Yes thanks.
Is there any way to use the autologin functionality if you want have a login area on the page. Like you have on this engage site?
/Aki
DWExtranetUsername = Global:Extranet.UserName and so on.
Works for these:
<!--@Global:Extranet.Username-->
<!--@Global:Extranet.Password-->
But the ones required for autologin are not parsed.
<!--@Global:Extranet.UsernameRemember-->
<!--@Global:Extranet.PasswordRemember-->
/Aki
I have many users saying that it does not work.
You can also have them as hidden fields and set their value to true when autologin i checked.
OK, thanks for your help.
/Aki
I am tryin to accompish this in an other solution. Here is my code.
I have some javascript that sets the remeber username and password checkboxes.
Then I have the HTML for the loginform:
<form id="login" name="ExtUserForm" action="Default.aspx" method="post" onSubmit="return checkform();">
The autologin does not work with the above code. I cannot figure out why?
Regards / Aki
Hey Nicolai,
What is the status and implementation of “Auto-login functionality in Extranet” from ”http://developer.dynamicweb-cms.com/forum/feature-requests/auto-login-functionality-in-extranet.aspx”..
I can not get the “Autologin/Remember login” to work
My code from the Templates/Extranet
<script language="JavaScript">
function checkform(){
if(document.ExtUserForm.Username.value.length <= 0){
alert('Angiv brugernavn');
document.ExtUserForm.Username.focus();
return false;
}
if(document.ExtUserForm.Password.value.length <= 0){
alert('Angiv kodeord');
document.ExtUserForm.Password.focus();
return false;
}
return true;
}
</script>
<div id="content">
<form name="ExtUserForm" method="post" Action="<!--@DWExtranetAction-->" onSubmit="return checkform();if (this.checker.checked) toMem(this)" id="login-form">
<p>Indtast brugernavn og kodeord...</p>
<p>
<label for="login-username">Brugernavn</label>
<input type="text" tabindex="1" name="Username" value="<!--@DWExtranetUsername-->" id="login-username" class="round full-width-input" autofocus />
<input type="checkbox" value="True" name="DWExtranetUsernameRemember" <!--@DWExtranetUsernameRemember-->>Husk brugernavn
</p>
<p>
<label for="login-password">Kodeord</label>
<input type="password" tabindex="2" name="Password" value="<!--@DWExtranetPassword-->" id="login-password" class="round full-width-input" />
<input type="checkbox" value="True" name="DWExtranetPasswordRemember" <!--@DWExtranetPasswordRemember-->>Husk kodeord
<br/>
<input type="checkbox" value="True" name="autologin" id="autologin">Autologin
</p>
<!-- <p>I've <a href="#">forgotten my password</a>.</p>-->
<input type="submit" tabindex="3" value=" LOG IN " class="button round blue image-right ic-right-arrow">
</form>
</div>
mvh
Thomas Missmahl
Hi Thomas,
I have implemented the autologin feature in Dw 8.1.2.8 with this:
<form class="login-form" method="post" action="<!--@Global:Pageview.Url-->"> <input type="hidden" name="ID" value="<!--@Global:Page.ID-->" /> <input type="hidden" name="DWExtranetUsernameRemember" value="True" /> <input type="hidden" name="DWExtranetPasswordRemember" value="True" /> <input type="hidden" name="Autologin" value="True" /> <div class="alert alert-block alert-warning in fade login-form-error" style="display:none;"> <!--@Translate(SmartPage:User.Validate.Error, "Forkert brugernavn eller adgangskode")--> </div> <div class="control-group"> <div class="controls"> <label for="login-username"><!--@Translate(SmartPage:User.Login.Username, "Indtast e-mailadresse/brugernavn")--></label> <input type="text" id="login-username" class="login-credentials login-username-field" name="username" spellcheck="false" /> </div> </div> <div class="control-group"> <div class="controls"> <label for="login-password"><!--@Translate(SmartPage:User.Login.Password, "Indtast adgangskode")--></label> <input type="password" id="login-password" class="login-credentials login-password-field" name="password" /> </div> </div> <button type="submit" class="btn btn-primary btn-large pull-right" data-loading-text="Loading..."><!--@Translate(SmartPage:User.Login.Button, "Go!")--></button> </form>
Hope this will help you
Hi all,
I've just checked the feature on last DW (8.2.3.0) using ability described at NP's post above (13/10/2009) with the template provided and have good results - the functionality works properly, except one issue found - expiration date for Extranet autologin cookie does not follow the MC setting (new TFS 12190 has been submitted)
BR, Oleg