@@ -19,54 +19,22 @@ limitations under the License.
19
19
import { createClient } from "matrix-js-sdk/src/matrix" ;
20
20
import { MatrixClient } from "matrix-js-sdk/src/client" ;
21
21
import { logger } from "matrix-js-sdk/src/logger" ;
22
+ import { ILoginParams , LoginFlow } from "matrix-js-sdk/src/@types/auth" ;
22
23
23
24
import { IMatrixClientCreds } from "./MatrixClientPeg" ;
24
25
import SecurityCustomisations from "./customisations/Security" ;
25
26
27
+ export {
28
+ IdentityProviderBrand ,
29
+ IIdentityProvider ,
30
+ ISSOFlow ,
31
+ LoginFlow ,
32
+ } from "matrix-js-sdk/src/@types/auth" ;
33
+
26
34
interface ILoginOptions {
27
35
defaultDeviceDisplayName ?: string ;
28
36
}
29
37
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
-
70
38
export default class Login {
71
39
private hsUrl : string ;
72
40
private isUrl : string ;
0 commit comments