Author Topic: Custom Login Form  (Read 38994 times)

Offline axelseaa

  • Newbie
  • *
  • Posts: 1
Custom Login Form
« on: February 23, 2008, 06:30:22 PM »
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.

Offline adalle

  • Newbie
  • *
  • Posts: 9
Re: Custom Login Form
« Reply #1 on: February 26, 2008, 12:50:35 PM »
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:


https://.../mail/" method="post">

">
">



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...

Offline adalle

  • Newbie
  • *
  • Posts: 9
Re: Custom Login Form
« Reply #2 on: February 28, 2008, 11:53:43 AM »
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.

Offline sbridge

  • Newbie
  • *
  • Posts: 1
Huh?
« Reply #3 on: July 08, 2008, 12:01:30 PM »
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?

Offline MSglol

  • Newbie
  • *
  • Posts: 1
Custom Login Form
« Reply #4 on: December 11, 2009, 05:01:18 AM »
*bump*

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

Offline Julius Caesar

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 498
    • http://www.de-keizer.net/
Custom Login Form
« Reply #5 on: December 11, 2009, 10:44:24 AM »
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 he

Offline thomas_n

  • Newbie
  • *
  • Posts: 2
The solution with jQuery
« Reply #6 on: December 29, 2010, 08:54:29 AM »
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 Edit: December 29, 2010, 09:08:56 AM by thomas_n »

Offline ealey78

  • Newbie
  • *
  • Posts: 0
great
« Reply #7 on: February 17, 2011, 11:16:15 AM »
that is right .......

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Custom Login Form
« Reply #8 on: March 17, 2011, 09:43:39 AM »
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 (commercial)