OAuth "question type"?

More
1 year 9 months ago #145217 by matthewlehew
matthewlehew created the topic: OAuth "question type"?
This may be an odd request; I can't find it anywhere in the forums. This question is hypothetical and high-level...I'm not necessary looking for specific implementations or sample code, just your assessment on whether you think it would even be possible.

Summary: I want to create a public survey that has a "question" that allows the respondent to authenticate through an OAuth workflow and save the result of an API query as a response.

Hypothetical flow: The respondent begins the survey. The first question has a button labeled "authenticate." The respondent clicks the button and a popup appears requesting authentication to the identity service. After logging in, the popup requests the permissions for the LimeSurvey installation to read specific information. After access is granted, the popup closes and the respondent continues with the survey. The respondent's user ID with the identity service is saved as a response.

Reason: I am conducting surveys for PhD research among users of a specific service. The service offers an OAuth 2.0 API. The obvious fallback option is to have respondents self-report their ID with the service and just not validate it, but I'm attempting due diligence to see if there's a way to validate that the respondent actually owns the ID.

Issues: I've only been familiar with LimeSurvey for a while, but I know this would obviously require an extension of some sort. I have enough of a programming background to try it myself, and I also have much more experienced friends that can help, but I'm not familiar enough with LimeSurvey's architecture (or Yii2, for that matter) to make a determination of whether this is feasible at all, or where the best place would be to try to implement it. Because OAuth 2.0 utilizes redirects, the main thing I'm trying to figure out is how to handle the OAuth URI redirect followed by my server's query for data and then reloading the page while preserving the survey instance. My first thought was to develop a custom entry page that contained the OAuth login, and then my server can grab the data and use it to craft a custom URL that will prefill the ID and hide the data, but then there's the problem of knowing that I've gone to all the trouble of using OAuth just to provide a way for the respondent to manually alter that data by altering the URL.

My other thought is trying to see if there's some kind of hook available for manually adding data as discussed in manual.limesurvey.org/Workarounds:_Surve...to_manually_add_data , but this is where my knowledge of LimeSurvey is falling short and I could use some more information.

Any thoughts or suggestions or context would be greatly appreciated!

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #145244 by DenisChenu
DenisChenu replied the topic: OAuth "question type"?
I really think the best way is to
- Token enable survey
- Use a register allowed survey
- Create a plugin to replace 'register' form by an Oauth form github.com/LimeSurvey/LimeSurvey/blob/ma...rController.php#L174

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
3 months 3 days ago #170134 by markusfluer
markusfluer replied the topic: OAuth "question type"?
There is an oAuth registration plugin already.
It will be made available shortly.

Please Log in or Create an account to join the conversation.

More
1 day 3 hours ago #174365 by Blendman974
Blendman974 replied the topic: OAuth "question type"?
So still no release for OAuth plugin ?

Please Log in or Create an account to join the conversation.

More
11 minutes ago #174379 by markusfluer
markusfluer replied the topic: OAuth "question type"?
We will make the OAuth plugin available as a part of our Premium packages in October.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!