phronesis / Auth0

This is an extension that adds the ability to log into your Magento application using Auth0
9 stars 6 forks source link

Name Retrieval From Auth0 #11

Closed phronesis closed 6 years ago

phronesis commented 6 years ago

Auth0 only sets the name field if the account is a social account. It does not set the name field if you are using an Auth0 database connection or custom database connection. For these kinds of connections, it requires the user to set the name in the user_metadata field. Because of this, we need provide a configuration option for how the name will be retrieved when registering a user. A user will input the structure using Array dot notation. Given the following array

[
    'name'=>'Didi Umoh',
    'user_metadata'=>[
        'full_name'=>'Didi Umoh'
    ]
]

to get the name, using the name key, the configuration value will be just name. To get the name using the full_name key, the configuration value will be user_metadata.full_name