@@ -19,54 +19,22 @@ limitations under the License.
1919import { createClient } from "matrix-js-sdk/src/matrix" ;
2020import { MatrixClient } from "matrix-js-sdk/src/client" ;
2121import { logger } from "matrix-js-sdk/src/logger" ;
22+ import { ILoginParams , LoginFlow } from "matrix-js-sdk/src/@types/auth" ;
2223
2324import { IMatrixClientCreds } from "./MatrixClientPeg" ;
2425import SecurityCustomisations from "./customisations/Security" ;
2526
27+ export {
28+ IdentityProviderBrand ,
29+ IIdentityProvider ,
30+ ISSOFlow ,
31+ LoginFlow ,
32+ } from "matrix-js-sdk/src/@types/auth" ;
33+
2634interface ILoginOptions {
2735 defaultDeviceDisplayName ?: string ;
2836}
2937
30- // TODO: Move this to JS SDK
31- interface IPasswordFlow {
32- type : "m.login.password" ;
33- }
34-
35- export enum IdentityProviderBrand {
36- Gitlab = "gitlab" ,
37- Github = "github" ,
38- Apple = "apple" ,
39- Google = "google" ,
40- Facebook = "facebook" ,
41- Twitter = "twitter" ,
42- }
43-
44- export interface IIdentityProvider {
45- id : string ;
46- name : string ;
47- icon ?: string ;
48- brand ?: IdentityProviderBrand | string ;
49- }
50-
51- export interface ISSOFlow {
52- type : "m.login.sso" | "m.login.cas" ;
53- // eslint-disable-next-line camelcase
54- identity_providers ?: IIdentityProvider [ ] ;
55- }
56-
57- export type LoginFlow = ISSOFlow | IPasswordFlow ;
58-
59- // TODO: Move this to JS SDK
60- /* eslint-disable camelcase */
61- interface ILoginParams {
62- identifier ?: object ;
63- password ?: string ;
64- token ?: string ;
65- device_id ?: string ;
66- initial_device_display_name ?: string ;
67- }
68- /* eslint-enable camelcase */
69-
7038export default class Login {
7139 private hsUrl : string ;
7240 private isUrl : string ;
0 commit comments