🐛 Add compability on userinfo
This commit is contained in:
parent
6a4f2b6869
commit
5b516094a0
@ -2,11 +2,12 @@ package api
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
|
||||
|
||||
"git.solsynth.dev/hypernet/passport/pkg/internal/http/exts"
|
||||
|
||||
"git.solsynth.dev/hypernet/passport/pkg/authkit/models"
|
||||
@ -74,6 +75,7 @@ func getUserinfo(c *fiber.Ctx) error {
|
||||
resp["name"] = data.Name
|
||||
resp["email"] = data.GetPrimaryEmail().Content
|
||||
resp["preferred_username"] = data.Nick
|
||||
resp["profile"] = data.Name
|
||||
|
||||
if data.Avatar != nil {
|
||||
resp["picture"] = *data.GetAvatar()
|
||||
|
Loading…
x
Reference in New Issue
Block a user