samedi 13 mai 2017

Getting data from Auth0/facebook JSON response with Ember 2.x

I have the starter seed from Auth0 set up, which works, and gives following (snippet of) json string:

          {
"name": "Silvio Langereis",
 "given_name": "Silvio",
 "family_name": "Langereis",
 "gender": "male",
...

In my main-profile.hbs, I have following preset code from Auth0 which displays corresponding items:

 <h3></h3>
<h4></h4>

Then the full json string is displayed with profile.body.

When I want to show , nothing shows up. I'm a bit puzzled by this. profile.name is right above it in the json and displays just fine. Anyone has an idea what's going on here ? The idea is to fill the already acquired data in a form so that the user can complete and submit (thus making a db record) on his first-time login.

This works properly, with the textfield filled in:

    <div class="form-group has-feedback ">
        <label class="col-sm-2 control-label">Gebruikersnaam*</label>
        <div class="col-sm-7 col-sm-offset-1">
            
            <span class="glyphicon glyphicon-ok form-control-feedback"></span>
        </div>
    </div>

This does not:

<div class="form-group">
    <label class="col-sm-2 control-label">Voornaam*</label>
    <div class="col-sm-7 col-sm-offset-1">
        
        <span class="glyphicon glyphicon-ok form-control-feedback"></span>
    </div>
</div>




Aucun commentaire:

Enregistrer un commentaire