🐛 Fix userinfo subject should be string
All checks were successful
release-nightly / build-docker (push) Successful in 3m18s
All checks were successful
release-nightly / build-docker (push) Successful in 3m18s
This commit is contained in:
parent
997ada9da6
commit
39904dc08c
@ -8,6 +8,7 @@ import (
|
|||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
jsoniter "github.com/json-iterator/go"
|
jsoniter "github.com/json-iterator/go"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPrincipal(c *fiber.Ctx) error {
|
func getPrincipal(c *fiber.Ctx) error {
|
||||||
@ -29,7 +30,7 @@ func getPrincipal(c *fiber.Ctx) error {
|
|||||||
raw, _ := jsoniter.Marshal(data)
|
raw, _ := jsoniter.Marshal(data)
|
||||||
jsoniter.Unmarshal(raw, &resp)
|
jsoniter.Unmarshal(raw, &resp)
|
||||||
|
|
||||||
resp["sub"] = data.ID
|
resp["sub"] = strconv.Itoa(int(data.ID))
|
||||||
resp["family_name"] = data.Profile.FirstName
|
resp["family_name"] = data.Profile.FirstName
|
||||||
resp["given_name"] = data.Profile.LastName
|
resp["given_name"] = data.Profile.LastName
|
||||||
resp["name"] = data.Name
|
resp["name"] = data.Name
|
||||||
|
Loading…
Reference in New Issue
Block a user