fetch registration flows
This commit is contained in:
parent
65dcf8bc36
commit
618d02d838
1 changed files with 5 additions and 0 deletions
|
@ -26,6 +26,7 @@ import type {ILogItem} from "../../logging/types";
|
|||
type RequestMethod = "POST" | "GET" | "PUT";
|
||||
|
||||
const CS_R0_PREFIX = "/_matrix/client/r0";
|
||||
const CS_V3_PREFIX = "/_matrix/client/v3";
|
||||
const DEHYDRATION_PREFIX = "/_matrix/client/unstable/org.matrix.msc2697.v2";
|
||||
|
||||
type Options = {
|
||||
|
@ -163,6 +164,10 @@ export class HomeServerApi {
|
|||
return this._unauthedRequest("GET", this._url("/login"));
|
||||
}
|
||||
|
||||
getRegistrationFlows(): IHomeServerRequest {
|
||||
return this._unauthedRequest("POST", this._url("/register", CS_V3_PREFIX), undefined, { auth: {} });
|
||||
}
|
||||
|
||||
passwordLogin(username: string, password: string, initialDeviceDisplayName: string, options?: IRequestOptions): IHomeServerRequest {
|
||||
return this._unauthedRequest("POST", this._url("/login"), undefined, {
|
||||
"type": "m.login.password",
|
||||
|
|
Reference in a new issue