feat: fix Apple OAuth issue (#2338)

* feat: fix sign in with apple bug

* fix username
This commit is contained in:
UsherFall
2023-09-18 15:42:00 +08:00
committed by Yang Luo
parent 0fc48bb6cd
commit 7f298efebc
6 changed files with 38 additions and 3 deletions

View File

@ -300,3 +300,12 @@ func GetValueFromDataSourceName(key string, dataSourceName string) string {
return ""
}
func GetUsernameFromEmail(email string) string {
tokens := strings.Split(email, "@")
if len(tokens) == 0 {
return uuid.NewString()
} else {
return tokens[0]
}
}