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
www.limesurvey.org/manual/Workarounds:_S...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!