0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

fix(console): should display user avatar through google connector

This commit is contained in:
Charles Zhao 2022-07-11 18:19:28 +08:00
parent d22d5ea914
commit e2f52635c0
No known key found for this signature in database
GPG key ID: 4858774754C92DF2

View file

@ -67,9 +67,15 @@ const UserDetails = () => {
{userId && data && (
<>
<Card className={styles.header}>
{/**
* Some social connectors like Google will block the references to its image resource,
* without specifying the referrerPolicy attribute. Reference:
* https://stackoverflow.com/questions/40570117/http403-forbidden-error-when-trying-to-load-img-src-with-google-profile-pic
*/}
<img
className={styles.avatar}
src={data.avatar || generateAvatarPlaceHolderById(userId)}
referrerPolicy="no-referrer"
/>
<div className={styles.metadata}>
<div className={styles.name}>{data.name ?? '-'}</div>