New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save User ID/name when not using tokens #154
Comments
Hi @SaschaFroelich ! My suggestion would be to debug and figure out this issue:
Typically a set of experiments (a battery) associated with one token will close the session if they hit the last experiment OR if they start a new session and the token is no longer in the browser. So if you are coming back later to do more the participant would be required to login again, e.g., this part: expfactory/expfactory/views/main.py Lines 120 to 143 in 1b0b570
We also keep track of experiments that are finished, and only direct the participant to the next if there are unfinished experiments.
So likely a little debugging would be needed on your part to figure out what is going on. I would take a look at the function that does the checks expfactory/expfactory/views/utils.py Lines 40 to 96 in 1b0b570
expfactory/expfactory/views/main.py Lines 146 to 169 in 1b0b570
I don't think using a different string (an identifier) would resolve this issue, because you'd run into the same issue but with a different string. Also, it's bad practice from a research data standpoint to store personal information alongside study data. In labs where I was an RA in the past we would always generate a study ID and only keep their actual name in a locked file to link to that ID. |
Hi Vanessa, thanks for your reply. Of course we don't store personal data alongside study data, we always use the anonymized study ID that each participant is assigned. Somewhere else, we have the personal data associated to the study ID saved in a secure file. The way it is now, we additionally have to keep track of the study tokens, which is a bit cumbersome, because any individual participant will need several tokens for our purposes. Furthermore, participants are told their study ID, which is done automatically, and they could simply use it to start the experiment. Instead, we have to manually send out tokens to each individual participant. You didn't really answer my question whether the newest version of expfactory would store the entered ID if we didn't use tokens but judging from your reply I suppose it doesn't. Btw, we have figured out why tokens are sometimes not accepted. It was an error on our part that had nothing to do with expfactory, as I had expected. |
That’s fantastic! So you would want to use the study ID to login instead? |
Yes, ideally that's what I'd like to do. |
How would you handle authentication? E.g., if you have
and they don't have to think about login. |
I think I didn't explain it right, by studyID I actually mean a participant's personal ID. So the idea is that at each experiment, they enter their personal ID, which is short and simple (think 12345). There would be no verification, but the occasional mix-up (if any) could easily be resolved on our side. Sending the participants the link with the token is a neat idea, but it's not really what I'm talking about. So currently, we have our research assistants invite the participants, giving them their personal ID (e.g. 12345), the token for day 1 of our experiment, and another token for the second day of the experiment, while saving participant IDs, associated tokens, and participant names in a separate file. This takes time, because each participant must be told their tokens individually. I thought this process could be streamlined by simply having the option to store a user's "login input" (in place of a token, here: 12345) in the resulting data file, or as its name. It would make everything a bit easier on everyone, including our participants. The advantage for experiments that last more than two days is obvious, although I admit those experiments are rare. I was told that this feature doesn't yet exist, and I thought it would be rather easy to implement. But perhaps it's not as easy as I had thought? Or perhaps I'm missing some obvious downsides that would come with it? Anyway thanks for your time and help. |
It's not about how hard/easy it is to implement, I'm trying to make sure I don't implement something that leads to either erroneous protocol (e.g, being able to guess an ID and enter the system using someone else's ID) or bad research practices (e.g., storing their personal information in expfactory). I will think more about it. |
The easiest thing we cold do is allow (akin to --vars) a --tokens variable that takes in a single delimited file of tokens, and then creates the tokens from file instead of randomly, e.g.,:
# Assuming $PWD is bound to /data
docker exec test-parse-url expfactory users --new /data/tokens.txt Would that work? |
Ok I see! Yes I think that is a great idea. Would previously generated tokens still be valid in such a case, i.e. would it be possible to iterately create more tokens as more participants come in, without creating conflicts with existing tokens or data? |
Yes I think so. If you ran the command with a repeated file it would just skip generation of ids already found. If this sounds good I’ll try to find some time in an evening to start on this. |
okay here is a start! #155 I could only test up through the end and couldn't test logging in because I use brave with really strong cookie preferences. But this should get us started if you want to follow the instructions there to test things out. Thanks! |
This PR was never reviewed - are you still interested in this @SaschaFroelich ? |
Hi all,
for a couple of reasons using tokens is suboptimal for our purposes (one reason is that sometimes tokens are not being accepted although they should be valid - but it is not clear whether this is an expfactory issue, because our participants have to perform several experiments that run on expfactory on the same server).
Anyway, I know that there is the possibility to use expfactory without tokens. In this case, participants are asked to enter a name before the experiment starts, however as far as I know in the past that name/ ID was not stored anywhere in the data. Unfortunately we need to be able to associate the data with the corresponding participants, so it is necessary that the entered name/ID appears somewhere in the data.
Has this been implemented in the meanwhile, or is it possible to do this?
Thank you!
Best,
Sascha
The text was updated successfully, but these errors were encountered: