I am following the doc https://learn.microsoft.com/en-us/graph/toolkit/components/login and testing mg-login control and I find when I set the userDetails property of it, it will not show email or image (I set an image url in it). Is it a bug or I missed something?
Below is my test code.
<html>
<head>
<script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script>
</head>
<body>
<mgt-login id="lgc"></mgt-login>
<mgt-teams-channel-picker></mgt-teams-channel-picker>
<script>
let loginControl = document.getElementById('lgc');
loginControl.userDetails = {
displayName: 'Justin Liu',
email: 'justin@contoso.com',
profileImage: 'https://www.baidu.com/img/pc_2e4ef5c71eaa9e3a3ed7fa3a388ec733.png'
}
</script>
</body>
</html>
Thanks for bringing this to our attention. You're correct this seems to be a bug, I've filled an issue here:
https://github.com/microsoftgraph/microsoft-graph-toolkit/issues/401