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.