Incomplete Profile Data Returned.

I always get this: {“sub”:“google-oauth2|101259207695434467727”} stored to profile in local storage instead of the JSON with more elements shown in more than one place in the docs. My code is: // Initializing our Auth0Lock var lock = new Auth0Lock( ‘A8QJ8MLQbvCfh9BM2ngJLFzNrdYfKZnN’, ‘nwsltr.auth0.com’ ); // Listening for the authenticated event lock.on(“authenticated”, function(authResult) { // Use the token in authResult to getUserInfo() and save it to localStorage lock.getUserInfo(authResult.accessToken, function(error, profile) { if (error) { alert(‘error’) return; } var options = { auth: { params: {scope: ‘openid email’}, } }; localStorage.setItem(‘accessToken’, authResult.accessToken); localStorage.setItem(‘profile’, JSON.stringify(profile)); This product has a lot of documentation and examples which are often inconsistent. FWIW, never have struggled so much trying to implement something purported to be so simple.

You should confirm if the platform mangled the code snippet you included and if it did update your question because the code does not seem right/complete… I tried to format it, but struggled a bit and ended up not being able to get a clear idea of the code that is being actually used.

The code is an exact copy of what’s in the docs.

// Initializing our Auth0Lock
var lock = new Auth0Lock(
  'A8QJ8MLQbvCfh9BM2ngJLFzNrdYfKZnN',
  'nwsltr.auth0.com'
);


// Listening for the authenticated event
lock.on("authenticated", function(authResult) {
  // Use the token in authResult to getUserInfo() and save it to localStorage
  lock.userinfo(authResult.accessToken, function(error, profile) {
    if (error) {
     alert('error')
      return;
    }

 var options = {
  auth: {
    params: {scope: 'openid email'},
  }
}; 


    localStorage.setItem('accessToken', authResult.accessToken);
    localStorage.setItem('profile', JSON.stringify(profile));
   // show_profile_info(profile);
	
	
accessToken = localStorage.getItem('accessToken');
	
accessToken = localStorage.getItem('profile');

PS Is there a way to get an actual support ticket ? This community doesn’t seem very active. Thanks!

That code still does not seem right so it might be a problem with the docs; can you link to the documentation you used as a reference. In relation to ticketed support, yes, as long as you have a subscription that includes a support plan (see https://auth0.com/docs/support).

Thanks for the note. I’ve invested way too much time with trying to get auth0 to work.

Yes, there is lots of documentation. And yes, I’ve seen inconsistencies that have caused me more lost time.

I switched to Firebase—was up and running in minutes.