feat(auth): include existing device ID in SSO and password login flows
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user