From ed151c8567b175b2c785710b299bc7a618e7c3a5 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 16 Feb 2022 12:33:59 +0530 Subject: [PATCH] Return token stage from createRegistrationStage --- src/matrix/registration/Registration.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/matrix/registration/Registration.ts b/src/matrix/registration/Registration.ts index c9c9af87..0d342639 100644 --- a/src/matrix/registration/Registration.ts +++ b/src/matrix/registration/Registration.ts @@ -18,6 +18,7 @@ import type {HomeServerApi} from "../net/HomeServerApi"; import type {BaseRegistrationStage} from "./stages/BaseRegistrationStage"; import {DummyAuth} from "./stages/DummyAuth"; import {TermsAuth} from "./stages/TermsAuth"; +import {TokenAuth, TOKEN_AUTH_TYPE} from "./stages/TokenAuth"; import type { AccountDetails, RegistrationFlow, @@ -108,6 +109,8 @@ export class Registration { return new DummyAuth(session, params?.[type]); case "m.login.terms": return new TermsAuth(session, params?.[type]); + case TOKEN_AUTH_TYPE: + return new TokenAuth(session, params?.[type]); default: throw new Error(`Unknown stage: ${type}`); }