Skip to content

Commit f0c26c6

Browse files
committed
Revert "Add login flow types from matrix-react-sdk (#2633)"
This reverts commit 583e480
1 parent a57c430 commit f0c26c6

File tree

2 files changed

+3
-58
lines changed

2 files changed

+3
-58
lines changed

src/@types/auth.ts

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -28,61 +28,6 @@ export interface IRefreshTokenResponse {
2828

2929
/* eslint-enable camelcase */
3030

31-
/**
32-
* Response to GET login flows as per https://spec.matrix.org/latest/client-server-api/#get_matrixclientv3login
33-
*/
34-
export interface ILoginFlowsResponse {
35-
flows: LoginFlow[];
36-
}
37-
38-
export type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow;
39-
40-
export interface ILoginFlow {
41-
type: string;
42-
}
43-
44-
export interface IPasswordFlow extends ILoginFlow {
45-
type: "m.login.password";
46-
}
47-
48-
/**
49-
* Representation of SSO flow as per https://spec.matrix.org/latest/client-server-api/#client-login-via-sso
50-
*/
51-
export interface ISSOFlow extends ILoginFlow {
52-
type: "m.login.sso" | "m.login.cas";
53-
// eslint-disable-next-line camelcase
54-
identity_providers?: IIdentityProvider[];
55-
}
56-
57-
export enum IdentityProviderBrand {
58-
Gitlab = "gitlab",
59-
Github = "github",
60-
Apple = "apple",
61-
Google = "google",
62-
Facebook = "facebook",
63-
Twitter = "twitter",
64-
}
65-
66-
export interface IIdentityProvider {
67-
id: string;
68-
name: string;
69-
icon?: string;
70-
brand?: IdentityProviderBrand | string;
71-
}
72-
73-
/**
74-
* Parameters to login request as per https://spec.matrix.org/latest/client-server-api/#login
75-
*/
76-
/* eslint-disable camelcase */
77-
export interface ILoginParams {
78-
identifier?: object;
79-
password?: string;
80-
token?: string;
81-
device_id?: string;
82-
initial_device_display_name?: string;
83-
}
84-
/* eslint-enable camelcase */
85-
8631
export enum SSOAction {
8732
/** The user intends to login to an existing account */
8833
LOGIN = "login",

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ import { IPusher, IPusherRequest, IPushRules, PushRuleAction, PushRuleKind, Rule
188188
import { IThreepid } from "./@types/threepids";
189189
import { CryptoStore } from "./crypto/store/base";
190190
import { MediaHandler } from "./webrtc/mediaHandler";
191-
import { ILoginFlowsResponse, IRefreshTokenResponse, SSOAction } from "./@types/auth";
191+
import { IRefreshTokenResponse, SSOAction } from "./@types/auth";
192192
import { TypedEventEmitter } from "./models/typed-event-emitter";
193193
import { ReceiptType } from "./@types/read_receipts";
194194
import { MSC3575SlidingSyncRequest, MSC3575SlidingSyncResponse, SlidingSync } from "./sliding-sync";
@@ -7080,10 +7080,10 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
70807080

70817081
/**
70827082
* @param {module:client.callback} callback Optional.
7083-
* @return {Promise<ILoginFlowsResponse>} Resolves to the available login flows
7083+
* @return {Promise} Resolves: TODO
70847084
* @return {module:http-api.MatrixError} Rejects: with an error response.
70857085
*/
7086-
public loginFlows(callback?: Callback): Promise<ILoginFlowsResponse> {
7086+
public loginFlows(callback?: Callback): Promise<any> { // TODO: Types
70877087
return this.http.request(callback, Method.Get, "/login");
70887088
}
70897089

0 commit comments

Comments
 (0)