diff --git a/back/src/Kyoo.Authentication/Models/DTO/JwtProfile.cs b/back/src/Kyoo.Authentication/Models/DTO/JwtProfile.cs index 22bd442d..e29fa5ab 100644 --- a/back/src/Kyoo.Authentication/Models/DTO/JwtProfile.cs +++ b/back/src/Kyoo.Authentication/Models/DTO/JwtProfile.cs @@ -24,6 +24,10 @@ namespace Kyoo.Authentication.Models.DTO; public class JwtProfile { public string Sub { get; set; } + public string Uid { set => Sub = value; } + public string Id { set => Sub = value; } + public string Guid { set => Sub = value; } + public string? Name { get; set; } public string? Username { get; set; } public string? Email { get; set; } diff --git a/back/src/Kyoo.Authentication/Models/Options/PermissionOption.cs b/back/src/Kyoo.Authentication/Models/Options/PermissionOption.cs index 1ae00412..4be74354 100644 --- a/back/src/Kyoo.Authentication/Models/Options/PermissionOption.cs +++ b/back/src/Kyoo.Authentication/Models/Options/PermissionOption.cs @@ -106,5 +106,14 @@ public class OidcProvider ProfileUrl = "https://openidconnect.googleapis.com/v1/userinfo", Scope = "email profile", }, + ["discord"] = new("discord") + { + DisplayName = "Discord", + LogoUrl = "https://logo.clearbit.com/discord.com", + AuthorizationUrl = "https://discord.com/oauth2/authorize", + TokenUrl = "https://discord.com/api/oauth2/token", + ProfileUrl = "https://discord.com/api/users/@me", + Scope = "email+identify", + } }; }