CakeOTP – Getting Started

Install CakeOTP

Fresh installation starting from CakeOTP:

  1. Download CakeOTP
  2. Unzip CakeOTP into your web servers apps folder (htdocs or www …)
  3. Create a database for CakeOTP and configure the connection in:
    [base folder]\cakeotp\gk\trunk\app\config\database.php
  4. Run the following script to create a user table:
    CREATE TABLE IF NOT EXISTS `users` (
      `id` int(11) NOT NULL auto_increment,
      `username` char(50) default NULL,
      `password` char(40) default NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
    
  5. Your done! Run the web server and the database and go to http://localhost/cakeotp/ (this can different on different machines)


Using existing CakePHP

  1. Download CakeOTP
  2. Copy the OTP component from app/controllers/components/otp.php to your app
  3. Review the user controller and user views, copy and modify as you see fit
  4. Make sure you have enabled the Cakephp core Auth component and created the Users Table.

You can also read CakePHP documentation and run CakeOTP online demo.

Feel free to post comments and questions.

Comments (2)

Hi,

Thank u for giving a great tool for mailing.
But the problem is after creating account it shows “Email send, please check your email for your CakeOTP”

but no mail is received.

NOTE: I am running this on my localhost. And I’ve followed all the steps mentioned in documentation.

I’ve also enabled SMTP service (I guess this is not required for sending out mails… but not very sure)

Am I missing anything here w.r.t configuration?

Please advice.

Thanks & Regards,
Vartha

@vertha – You need to enable SMTP on your server. Check out this for example – http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Remote_SMTP_Server_for_Sending_Mail.htm

When I do it, I just deply to my hosted Linux server and it works out of the box.

Amir

Post a comment