Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9133195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:26:41+00:00 2026-06-17T08:26:41+00:00

I am looking to implement Google Authenticator into a CakePHP application. The trick is

  • 0

I am looking to implement Google Authenticator into a CakePHP application. The trick is that a user can determine whether or not they want to use it. This means that if a user is using the multi-part login, they will log in normally with their username and password. Once they have successfully submitted their correct username / password combination, they need to be redirected to the page that asks for their passcode from Google Authenticator.

How do you limit the Authentication success until AFTER they enter the passcode? I can do the redirect and everything just fine, but if they exit the passcode form and go to the site, they have already authenticated using their username / password and they can navigate through the site just fine.

I need some direction on how to shut down authentication until AFTER the passcode confirmation is successful. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:26:42+00:00Added an answer on June 17, 2026 at 8:26 am

    I noticed this question is pretty old and unanswered, I also work on something similar so I’ll share my two cents. Hope you’ve already solved this problem by now.

    Your user management system should provide a session key only after the entire login process was fulfilled, this means that you should let users in only after they provide all auth data through all steps.

    1. receive user and password
    2. check credentials and authentication options
    3. if credentials are ok and no Google Auth enabled, give him session key, else retry
    4. if credetials are ok and Google Auth enabled, pass $_POST[‘user’] to challenge form
    5. if TOTP password matches server-side check, return session key, else retry
    $_POST[] ----> loginCheck() ----> if(GAuth) ----> checkTotp() ----> sessionKey
                                          |                                 |
                                          *---------------------------------*
    

    loginCheck() should check if user and passwords are ok, otherwise deny access

    if(GAuth) should return true or false, depeding if your user uses GAuth

    checkTotp should be a method to check TOTP password on client and server

    sessionKey should be the token used to access protected content, stored server-side and client-side for a period of time

    Or adapt this idea to your needs … in my opinion you should accept the user in the system when he passes all authentication trials.

    You could make an user form that hols user/password and passcode and process all data at once and avoid two pages.

    Read more about https://www.rfc-editor.org/rfc/rfc6238

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to use one-time passwords that can be generated using Google Authenticator
I am looking for the best way to notify a user that they need
So I was looking at Google's I/O App, iosched, and I notice they implement
I am looking for a javascript library (or algorithm that I can implement) to
Looking at Thrift and Google Protocol Buffers to implement some quick RPC code. Thrift
Looking to implement a RIA (rich internet application) either as a java (JWS) application
I am looking to implement some throttling behavior into one of my viewmodels. It's
I'm looking to implement a warning if the user attempts to leave the order
I'm looking to implement the jQuery UI so that the slider bar fills one
I was looking to implement such menu as http://www.fogcreek.com/FogBugz/learnmore.html (Left hand side) Can anyone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.