Access to user data can be handled in a few ways, and is dependent on settings in the authentication flow configuration.

In cases where:
 aeJS.settings['auth_window'] = true; 

The user data will be available in the JS layer.

If the user session already exists a user object is available as part of the aeJS object. The user object will also be broadcast across any onLogin or onUser event handlers (see Events).

In cases where:
 aeJS.settings['auth_window'] = false; 

The user object is still available in the JS layer as part of the aeJS object and within events, but a method of providing an ‘accesstoken’ at a specified return url is also available on browser redirect. The access token can be used to make an ‘auth’ call to the AE REST API and return required user data.

Note: Any calls to the AE REST API should be made via server side code running on the local machine with it’s IP whitelisted.

Basic User Data Fields:

  1. AccessToken:"c5b52cc1e9b9d4395f10d7bb0c929bae_1485121375"
  2. Address:"123 Some Street"
  3. AddressLine2:"Unit A"
  4. AvatarURL:"http://theappreciationengine.com/Member_Controller/getAvatar/123/123"
  5. Bio:"Im great!"
  6. BirthDate:"1976-01-26"
  7. City:"Victoria"
  8. Country:”Canada"
  9. CountryCode:"CA"
  10. Email:"john@email.com"
  11. Extended: <Object>
  12. FirstName:"John"
  13. Gender:"M"
  14. GeoCountry:"CA"
  15. GeoIP:"24.68.36.245"
  16. GeoLat:"48.4993"
  17. GeoLong:"-123.4003"
  18. ID:xxx
  19. MobilePhone:"1234567890"
  20. PostCode:"90404"
  21. State:"BC"
  22. Surname:"Smith"
  23. Username:"john_smith"
  24. VerifiedEmail:"john@verified_email.com"
  25. Website:"http://www.johnsmith.com"

In all cases, the user data can then be passed onto local methods to store and create a local record in the CRM.

Additional User Data Fields:

Custom data fields specific to your member schema configuration may also be available in the ‘data.Extended’ field.

Example:

Did this answer your question?