diff --git a/front/packages/models/src/resources/user.ts b/front/packages/models/src/resources/user.ts
index 0b47d830..90b7f049 100644
--- a/front/packages/models/src/resources/user.ts
+++ b/front/packages/models/src/resources/user.ts
@@ -64,6 +64,19 @@ export const UserP = ResourceP("user")
})
// keep a default for older versions of the api
.default({}),
+ /**
+ * User accounts on other services.
+ */
+ externalId: z
+ .record(
+ z.string(),
+ z.object({
+ id: z.string(),
+ username: z.string().optional(),
+ profileUrl: z.string().nullable(),
+ }),
+ )
+ .default({}),
})
.transform((x) => ({ ...x, logo: imageFn(`/user/${x.slug}/logo`) }));
diff --git a/front/packages/ui/src/settings/oidc.tsx b/front/packages/ui/src/settings/oidc.tsx
index 1578f05e..a40ea09a 100644
--- a/front/packages/ui/src/settings/oidc.tsx
+++ b/front/packages/ui/src/settings/oidc.tsx
@@ -19,7 +19,7 @@
*/
import { QueryIdentifier, ServerInfo, ServerInfoP, useAccount, useFetch } from "@kyoo/models";
-import { IconButton, Skeleton, tooltip, ts } from "@kyoo/primitives";
+import { A, Button, IconButton, Link, Skeleton, tooltip, ts } from "@kyoo/primitives";
import { useTranslation } from "react-i18next";
import { ImageBackground } from "react-native";
import { rem, useYoshiki } from "yoshiki/native";
@@ -41,37 +41,54 @@ export const OidcSettings = () => {
{error ? (
) : data ? (
- Object.values(data.oidc).map((x) => (
- {
+ const acc = account.externalId[id];
+ return (
+
+ )
+ }
+ >
+ {acc ? (
+ <>
+ {acc.profileUrl && (
+
+ )}
+ {}}
+ {...tooltip(t("settings.oidc.delete", { provider: x.displayName }))}
+ />
+ >
+ ) : (
+
- ))
+ )}
+
+ );
+ })
) : (
[...Array(3)].map((_, i) => (