Open baradhili opened 7 months ago
currently this is in Provider
protected function mapUserToObject(array $user) { return(new User())->setRaw($user)->map([ 'id' => $user['sub'], 'nickname' => $user['name'], 'name' => $user['name'], 'email' => $user['emails'][0], ]); }
However Azure OpenID returns:
[ver] => 1.0 [iss] => [sub] => [aud] => [exp] => [acr] => b2c_1a_dev_ob_shared_corpaad_basic_signin [iat] => [auth_time] => [socialIdpUserId] => [given_name] => [family_name] => [email] => [name] => [authenticationSource] => [idp] => [nbf] =>
code should be
protected function mapUserToObject(array $user) { return(new User())->setRaw($user)->map([ 'id' => $user['sub'], 'nickname' => $user['name'], 'name' => $user['name'], 'email' => $user['email'], ]); }
Though I suspect this might also be a MS barf and I wouldn't be surprised if they return different claims depending on the policy type etc.. might need to do some decisions before mapping
note socialIdpUserId also contains the email
Can you link to the docs please? PR welcome
PR sent
currently this is in Provider
However Azure OpenID returns:
code should be
Though I suspect this might also be a MS barf and I wouldn't be surprised if they return different claims depending on the policy type etc.. might need to do some decisions before mapping