mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
fetch registration flows
This commit is contained in:
parent
65dcf8bc36
commit
618d02d838
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user