+ Reply to Thread
Results 1 to 9 of 9

Thread: Custom Login Form

  1. #1
    axelseaa is offline Registered User
    Join Date
    Feb 2008
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default Custom Login Form

    Is it possible to create a custom login form that will post to roundcube for login? So far i have not been able to get this to work correctly, it always says incorrect password.

  2. #2
    adalle is offline Registered User
    Join Date
    Dec 2007
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Re: Custom Login Form

    We do something like this. We already have members logging into our site with their credentials, so we provide a "Get your Webmail" link that is a JSP page that invokes a perl script to auto-create their roundcube user if it doesn't already exist (and do extra things like setting up their default identity etc.), and then prints out this:

    <body onload='document.login.submit()'>
    <form name="login" action="https://.../mail/" method="post">
    <input type="hidden" name="_action" value="login">
    <input type="hidden" name="_user" value="<%= userData.getLoginName() %>">
    <input type="hidden" name="_pass" value="<%= userData.getLoginPassword() %>">
    </form>
    </body>

    It does work quite well. I am having an issue where sometimes Roundcube complains about the browser not supporting cookies and fails to login, but re-posting to the page always works. Must be something to do with expired sessions...

  3. #3
    adalle is offline Registered User
    Join Date
    Dec 2007
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default Re: Custom Login Form

    The cookie issue of course, is because when you first loadup the login page, it creates a session and sets the roundcube_session cookie.

    To get around this, since we want to bypass the login-page, I had to have our page that launches to roundcube actually access the login page to create the session and scrape the Set-Cookie header, update the rouncube session database with the IP address of the client for the matching newly-created session, and return the Set-Cookie header in our response.

    As a result, the client browser will already have the cookie set when they POST to the login page, resulting in successful login.

    This could be avoided if Roundcube was patched to allow for an auto-login like this.

  4. #4
    sbridge is offline Registered User
    Join Date
    Jul 2008
    Posts
    1
    Downloads
    0
    Uploads
    0

    Question Huh?

    I can't get this to work...

    I just got RC installed in my CPanel and love it. I REALLY want to have a custom login, as described in this forum, but I'm confused.

    How would I create a basic form requesting username and password and then parse the credentials to RC? Is that possible?

  5. #5
    MSglol is offline Registered User
    Join Date
    Dec 2009
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default

    *bump*

    Also want to be able to have an custom loginform for my webpage.

  6. #6
    Julius Caesar's Avatar
    Julius Caesar is offline Super Moderator
    Join Date
    Oct 2008
    Location
    Netherlands
    Posts
    501
    Downloads
    38
    Uploads
    1

    Default

    Try to modify the login.html is the folder ./skins/default/templates.
    Julius Caesar

    You can download the Groupvice4 theme here.
    Sie können Groupvice4 hier herunterladen.

  7. #7
    thomas_n is offline Roundcube Newcomer
    Join Date
    Dec 2010
    Posts
    2
    Downloads
    0
    Uploads
    0

    Lightbulb The solution with jQuery

    I've seen this asked a million times before, and actually, the solution is quite simple. You just use jQuery to get the Roundcube login form, modify it just a little bit and then add it to your own page.

    I've written a small tutorial on how to do this, it can be found on www.culturecrew.be/en/creative-code/roundcube-login-page/.

    This approach works so long as the Roundcube installation resides on the same (sub-)domain as your page, because otherwise it would be considered cross-site scripting by your browser.
    Last edited by thomas_n; 12-29-2010 at 02:08 PM. Reason: Typo

  8. #8
    mrk3nx is offline Roundcube Newcomer
    Join Date
    Mar 2011
    Posts
    2
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by thomas_n View Post
    I've seen this asked a million times before, and actually, the solution is quite simple. You just use jQuery to get the Roundcube login form, modify it just a little bit and then add it to your own page.luxusalusasut
    business opportunity

    I've written a small tutorial on how to do this, it can be found on www.culturecrew.be/en/creative-code/roundcube-login-page/.

    This approach works so long as the Roundcube installation resides on the same (sub-)domain as your page, because otherwise it would be considered cross-site scripting by your browser.
    thanks i have same problem .
    Last edited by mrk3nx; 03-21-2011 at 05:38 AM.

  9. #9
    rosali's Avatar
    rosali is offline Super Moderator
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    2,392
    Downloads
    36
    Uploads
    0

    Default

    For Roundcube v0.5.1 give my logout_redirect plugin a shot. There is a sample login page in the folder ajax_login.
    Regards,
    Rosali

    __________________
    MyRoundcube Project http://myroundcube.googlecode.com
    MyRoundcube Online Demo - Free Email Address http://mail4us.net
    MyRoundcube Plugins Generic Installation Guide http://mail4us.net/myroundcube/index.php
    Mailing List http://mail4us.net/?_action=plugin.nabble

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts