New incremental auth

This commit is contained in:
Robert Long
2022-02-15 12:46:58 -08:00
parent 63229ce2d7
commit 0f6b8f9bb1
8 changed files with 249 additions and 81 deletions

View File

@@ -25,7 +25,13 @@ export function useInteractiveRegistration() {
}, []);
const register = useCallback(
async (username, password, recaptchaResponse, passwordlessUser) => {
async (
username,
password,
displayName,
recaptchaResponse,
passwordlessUser
) => {
const interactiveAuth = new InteractiveAuth({
matrixClient: authClientRef.current,
busyChanged(loading) {
@@ -66,7 +72,7 @@ export function useInteractiveRegistration() {
deviceId: device_id,
});
await client.setDisplayName(username);
await client.setDisplayName(displayName);
const session = { user_id, device_id, access_token, passwordlessUser };