Yii Framework Forum: Two step authentication - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Two step authentication Rate Topic: -----

#1 User is offline   cass 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 59
  • Joined: 01-February 09
  • Location:London, UK

Posted 31 October 2009 - 02:50 PM

Hello all,

What would be the best way to approach the implementation of a two step authenthication method?

Would it be suitable to set a state on the extended CUserIdentity class and test it?

The result I am aiming at is:

1) User inputs username and password
2) User is taken to another page that asks for zip code and town

If only step one is verified, I would like the user to be diverted directly to Step 2 without being able to progress to other areas of the site.

If both steps requirements are satisfied, then user is considered logged in and will be taken to the relevant page.

Any help much appreciated.

Cheers,

Cass
0

#2 User is offline   jayrulez 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 348
  • Joined: 29-July 09

Posted 31 October 2009 - 03:48 PM

View Postcass, on 31 October 2009 - 02:50 PM, said:

Hello all,

What would be the best way to approach the implementation of a two step authenthication method?

Would it be suitable to set a state on the extended CUserIdentity class and test it?

The result I am aiming at is:

1) User inputs username and password
2) User is taken to another page that asks for zip code and town

If only step one is verified, I would like the user to be diverted directly to Step 2 without being able to progress to other areas of the site.

If both steps requirements are satisfied, then user is considered logged in and will be taken to the relevant page.

Any help much appreciated.

Cheers,

Cass


You can solve this by using a combination of CWebUser::setFlash(), CWebUser::getFlash() and CWebUser::hetFlash()
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";

python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]

ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}


You say Tomato, I say Tomato.
0

#3 User is offline   cass 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 59
  • Joined: 01-February 09
  • Location:London, UK

Posted 01 November 2009 - 05:43 AM

View Postjayrulez, on 31 October 2009 - 03:48 PM, said:

You can solve this by using a combination of CWebUser::setFlash(), CWebUser::getFlash() and CWebUser::hetFlash()


Hello jayrulez. Thanks for your reply, but flash messages in that context are partly relevant, as they would only replace messages that would otherwise be shown on the view.

My question is about maintaining a state that is neither logged in nor logged out - it is something in between which would allow for the zip code/town check to happen.

Cheers

Cass
0

#4 User is offline   cass 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 59
  • Joined: 01-February 09
  • Location:London, UK

Posted 07 November 2009 - 03:31 AM

View Postcass, on 01 November 2009 - 05:43 AM, said:

Hello jayrulez. Thanks for your reply, but flash messages in that context are partly relevant, as they would only replace messages that would otherwise be shown on the view.

My question is about maintaining a state that is neither logged in nor logged out - it is something in between which would allow for the zip code/town check to happen.

Cheers

Cass


Hi all,

I ended up using sessions for this and it worked as it should.

Cass
0

#5 User is offline   scythah 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 44
  • Joined: 20-April 09

Posted 10 November 2009 - 08:00 AM

View Postcass, on 07 November 2009 - 03:31 AM, said:

Hi all,

I ended up using sessions for this and it worked as it should.

Cass

To help build up documentation resources, perhaps you could put in some details of what you did in case someone else comes along looking to do something similar?
0

#6 User is offline   rostowich 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 18-December 13

Posted 29 September 2014 - 03:47 AM

How have you done to solve yhis issue.
I have the same issue but no solution.

BR
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users