Skip to content
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

How can I use data from a JSON to authenticate my user ? #337

Open
gabrIbanez opened this issue Jun 20, 2018 · 0 comments
Open

How can I use data from a JSON to authenticate my user ? #337

gabrIbanez opened this issue Jun 20, 2018 · 0 comments

Comments

@gabrIbanez
Copy link

gabrIbanez commented Jun 20, 2018

Hello,

I'm using a typeForm in my app.
This is the Json it's sends to my API :

`Parameters: {"event_id"=>"LtWXD3crgy", "event_type"=>"form_response", "form_response"=>{"form_id"=>"lT4Z3j", "token"=>"a3a12ec67a1365927098a606107fac15", "submitted_at"=>"2018-01-18T18:17:02Z",

"hidden"=>{"source"=>"xxxxx", "user_email"=>"[email protected]", "user_token"=>"HbLYEWD7fbWk1DqMZJ3z"},

"landed_at"=>"2018-01-18T18:07:02Z", "calculated"=>{"score"=>9}, "definition"=>{"id"=>"lT4Z3j", "title"=>"Webhooks example", "fields"=>[{"id"=>"DlXFaesGBpoF", "title"=>"Thanks, {{answer_60906475}}! What's it like where you live? Tell us in a few sentences.", "type"=>"long_text", "ref"=>"[readable_ref_long_text", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"SMEUb7VJz92Q", "title"=>"If you're OK with our city management following up if they have further questions, please give us your email address.", "type"=>"email", "ref"=>"readable_ref_email", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"JwWggjAKtOkA", "title"=>"What is your first name?", "type"=>"short_text", "ref"=>"readable_ref_short_text", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"KoJxDM3c6x8h", "title"=>"When did you move to the place where you live?", "type"=>"date", "ref"=>"readable_ref_date", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"PNe8ZKBK8C2Q", "title"=>"Which pictures do you like? You can choose as many as you like.", "type"=>"picture_choice", "ref"=>"readable_ref_picture_choice", "allow_multiple_selections"=>true, "allow_other_choice"=>false}, {"id"=>"Q7M2XAwY04dW", "title"=>"On a scale of 1 to 5, what rating would you give the weather in Sydney? 1 is poor weather, 5 is excellent weather", "type"=>"number", "ref"=>"readable_ref_number1", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"gFFf3xAkJKsr", "title"=>"By submitting this form, you understand and accept that we will share your answers with city management. Your answers will be anonymous will not be shared.", "type"=>"legal", "ref"=>"readable_ref_legal", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"k6TP9oLGgHjl", "title"=>"Which of these cities is your favorite?", "type"=>"multiple_choice", "ref"=>"readable_ref_multiple_choice", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"RUqkXSeXBXSd", "title"=>"Do you have a favorite city we haven't listed?", "type"=>"yes_no", "ref"=>"readable_ref_yes_no", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"NRsxU591jIW9", "title"=>"How important is the weather to your opinion about a city? 1 is not important, 5 is very important.", "type"=>"opinion_scale", "ref"=>"readable_ref_opinion_scale", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"WOTdC00F8A3h", "title"=>"How would you rate the weather where you currently live? 1 is poor weather, 5 is excellent weather.", "type"=>"rating", "ref"=>"readable_ref_rating", "allow_multiple_selections"=>false, "allow_other_choice"=>false}, {"id"=>"pn48RmPazVdM", "title"=>"On a scale of 1 to 5, what rating would you give the general quality of life in Sydney? 1 is poor, 5 is excellent", "type"=>"number", "ref"=>"readable_ref_number2", "allow_multiple_selections"=>false, "allow_other_choice"=>false}]}}`

I'd like to use "hidden" witch contains user_token and user_mail to authenticate my user.
What should I do ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant