feat(auth): include existing device ID in SSO and password login flows

This commit is contained in:
2026-02-19 18:07:40 +11:00
parent 3f6f2134ad
commit 8f1ba610fc
3 changed files with 12 additions and 2 deletions

View File

@@ -14,8 +14,10 @@ export function SSOLogin({ providers, redirectUrl, action, saveScreenSpace }: SS
const baseUrl = discovery['m.homeserver'].base_url;
const mx = useMemo(() => createClient({ baseUrl }), [baseUrl]);
const getSSOIdUrl = (ssoId?: string): string =>
mx.getSsoLoginUrl(redirectUrl, 'sso', ssoId, action);
const getSSOIdUrl = (ssoId?: string): string => {
const existingDeviceId = localStorage.getItem('cinny_device_id') ?? undefined;
return mx.getSsoLoginUrl(redirectUrl, 'sso', ssoId, action, existingDeviceId);
};
const withoutIcon = providers
? providers.find(