PacketFence - BTS - PacketFence
View Issue Details
0001860PacketFencecaptive portalpublic2015-01-19 08:512015-01-27 10:09
repitah 
jsemaan.inverse 
normalminoralways
assignedopen 
AllAllAll
4.5.0 
 
0001860: Oauth2 methods do not populate User account fields
When registering with Facebook/Google/MicrosoftLive (others untested) account, the user details (names, email, etc) are not captured.
Log in to the captive portal with a Facebook/Google/Microsoft account that has not previously been used.

Check the newly created user account for the registered device.
Example JSON information received, from /html/captive-portal/lib/captiveportal/PacketFence/ControllerOauth2.pm :: oauth2Result, that can be populated:

Facebook:{"id":"101XXXX5391XXXX17","email":"repXXXX\u0040XXXXil.com","first_name":"myFirstname","gender":"male","last_name":"myLastname","link":"https:\/\/www.facebook.com\/app_scoped_user_id\/101XXXX5391XXXX17\/","locale":"en_GB","name":"myFirstname myLastname","timezone":2,"updated_time":"2014-04-01T14:29:08+0000","verified":true}

Google: {"id": "1104XXXX82237XXXX2302","email": "repXXXX@XXXXil.com", "verified_email": true,"name": "myFirstname myLastname","given_name": "myFirstname", "family_name": "myLastname", "link": "https://plus.google.com/1104XXXX82237XXXX2302", [^] "picture": "https://lh3.googleusercontent.com/URL/to/photo.jpg", [^] "gender": "male"}

Microsoft: {"id": "fa87XXXX16e7XXXX", "name": "myFirstname myLastname", "first_name": "myFirstname", "last_name": "myLastname", "link":"https://profile.live.com/","birth_day": [^] null,"birth_month": null,"birth_year": null,"gender": null,"emails": {"preferred": "repXXXX@XXXXil.com","account": "repXXXX@XXXXil.com","personal": null,"business": null},"phones": {"personal": null,"business": null,"mobile": null},"locale": "en_ZA","updated_time": "2015-01-17T14:00:59+0000"}
No tags attached.
Issue History
2015-01-19 08:51repitahNew Issue
2015-01-19 09:04ludovicAssigned To => jsemaan.inverse
2015-01-19 09:04ludovicStatusnew => assigned
2015-01-19 09:07jsemaan.inverseNote Added: 0003636
2015-01-19 09:09jsemaan.inverseNote Added: 0003637
2015-01-27 10:09jsemaan.inverseNote Added: 0003640

Notes
(0003636)
jsemaan.inverse   
2015-01-19 09:07   
I'll also do it for LinkedIn + Github.

We'll need to design it properly though.

Will add a link to the Github Pull request once done.
(0003637)
jsemaan.inverse   
2015-01-19 09:09   
I'll extend on the work done in
https://github.com/inverse-inc/packetfence/pull/282 [^]
(0003640)
jsemaan.inverse   
2015-01-27 10:09   
Development work done

See :
https://github.com/inverse-inc/packetfence/pull/319 [^]