mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
Oauth fixes for Cognito (#686)
* Add a restart to melisearch in docker-compose.yml * Oauth fixes for Cognito * Use the username or email for full name from oath if not provided --------- Co-authored-by: Donavan <snark@hey.com>
This commit is contained in:
parent
5da833e066
commit
8f9f09698b
2 changed files with 33 additions and 1 deletions
|
|
@ -67,13 +67,15 @@ async function setupOpenId() {
|
|||
fullName = userinfo.given_name;
|
||||
} else if (userinfo.family_name) {
|
||||
fullName = userinfo.family_name;
|
||||
} else {
|
||||
fullName = userinfo.username || userinfo.email;
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
user = new User({
|
||||
provider: 'openid',
|
||||
openidId: userinfo.sub,
|
||||
username: userinfo.given_name || '',
|
||||
username: userinfo.username || userinfo.given_name || '',
|
||||
email: userinfo.email || '',
|
||||
emailVerified: userinfo.email_verified || false,
|
||||
name: fullName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue