Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

one-time passwords

  • azakaria
  • azakaria's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #176447 by azakaria
one-time passwords was created by azakaria
Hi,

I'm trying to use the one-time passwords feature. but the online documentation is not clear. one time it says to add
Code:
$use_one_time_passwords = true;
to the config.php file, and in another page it says to add
Code:
config['use_one_time_passwords'] = true;
, but third site, suggested to add the following code
Code:
'use_one_time_passwords'=>true,
under
Code:
'config'=>array()

Anyways, I added the following in my config.php file
Code:
'config'=>array(
    'debug'=>0,
    'debugsql'=>0, // Set this to 1 to enanble sql logging, only active when debug = 2
    // Update default LimeSurvey config here
    'use_one_time_passwords'=>true,
  )

then I inserted the MD5 password to the table "lime_users".
Code:
$mstr = "mysecret";
echo md5($mstr);

when I try the URL

company.com/survey/index.php/admin/authe...ser&onepass=mysecret


it keeps complaining that the username & password is not working! any idea how to make one-time password feature to work, please?

I appreciate your time. Thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176460 by DenisChenu
Replied by DenisChenu on topic one-time passwords
I just answer on this point :

azakaria wrote: but third site, suggested to add the following code

Code:
'use_one_time_passwords'=>true,
under
Code:
'config'=>array()

Anyways, I added the following in my config.php file
Code:
'config'=>array(
    'debug'=>0,
    'debugsql'=>0, // Set this to 1 to enanble sql logging, only active when debug = 2
    // Update default LimeSurvey config here
    'use_one_time_passwords'=>true,
  )


This is the good way, can you give link to the other way ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • azakaria
  • azakaria's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago - 5 years 5 months ago #176477 by azakaria
Replied by azakaria on topic one-time passwords
The other ways are listed in LS documentations:
manual.limesurvey.org/Optional_settings#Use_one_time_passwords
manual.limesurvey.org/Manage_users
each site suggest different ways!
But all methods are not working with me.
Any other suggestions?
Where exactly in config.php I should put
Code:
config['use_one_time_passwords'] = true;
or
Code:
$use_one_time_passwords = false;
Anyone was able to make this feature to work? Thanks!
Last edit: 5 years 5 months ago by azakaria.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago #176484 by DenisChenu
Replied by DenisChenu on topic one-time passwords
I already give the good way and updated manual.limesurvey.org/Optional_settings#Use_one_time_passwords

else : I never test this feature …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • azakaria
  • azakaria's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
5 years 5 months ago #176544 by azakaria
Replied by azakaria on topic one-time passwords
It worked!
Actually, the password should be saved as sha256

$passwd = hash('sha256', "mysecret");

then from MySQL:
update lime_users set one_time_pw=$password where users_name=survey_user

Thanks!
The topic has been locked.
More
5 years 5 months ago - 5 years 5 months ago #176548 by jelo
Replied by jelo on topic one-time passwords

DenisChenu wrote: I already give the good way and updated manual.limesurvey.org/Optional_settings#Use_one_time_passwords

Small glitch in your anchor, so here is the direct link to your updated text passage:
manual.limesurvey.org/Optional_settings#Use_one-time_passwords

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 5 years 5 months ago by jelo.
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose