1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export var CognitoHostedUIIdentityProvider;
|
14 | (function (CognitoHostedUIIdentityProvider) {
|
15 | CognitoHostedUIIdentityProvider["Cognito"] = "COGNITO";
|
16 | CognitoHostedUIIdentityProvider["Google"] = "Google";
|
17 | CognitoHostedUIIdentityProvider["Facebook"] = "Facebook";
|
18 | CognitoHostedUIIdentityProvider["Amazon"] = "LoginWithAmazon";
|
19 | CognitoHostedUIIdentityProvider["Apple"] = "SignInWithApple";
|
20 | })(CognitoHostedUIIdentityProvider || (CognitoHostedUIIdentityProvider = {}));
|
21 | export function isFederatedSignInOptions(obj) {
|
22 | var keys = ['provider'];
|
23 | return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });
|
24 | }
|
25 | export function isFederatedSignInOptionsCustom(obj) {
|
26 | var keys = ['customProvider'];
|
27 | return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });
|
28 | }
|
29 | export function hasCustomState(obj) {
|
30 | var keys = ['customState'];
|
31 | return obj && !!keys.find(function (k) { return obj.hasOwnProperty(k); });
|
32 | }
|
33 | export function isCognitoHostedOpts(oauth) {
|
34 | return oauth.redirectSignIn !== undefined;
|
35 | }
|
36 | export var AuthErrorTypes;
|
37 | (function (AuthErrorTypes) {
|
38 | AuthErrorTypes["NoConfig"] = "noConfig";
|
39 | AuthErrorTypes["MissingAuthConfig"] = "missingAuthConfig";
|
40 | AuthErrorTypes["EmptyUsername"] = "emptyUsername";
|
41 | AuthErrorTypes["InvalidUsername"] = "invalidUsername";
|
42 | AuthErrorTypes["EmptyPassword"] = "emptyPassword";
|
43 | AuthErrorTypes["EmptyCode"] = "emptyCode";
|
44 | AuthErrorTypes["SignUpError"] = "signUpError";
|
45 | AuthErrorTypes["NoMFA"] = "noMFA";
|
46 | AuthErrorTypes["InvalidMFA"] = "invalidMFA";
|
47 | AuthErrorTypes["EmptyChallengeResponse"] = "emptyChallengeResponse";
|
48 | AuthErrorTypes["NoUserSession"] = "noUserSession";
|
49 | AuthErrorTypes["Default"] = "default";
|
50 | AuthErrorTypes["DeviceConfig"] = "deviceConfig";
|
51 | AuthErrorTypes["NetworkError"] = "networkError";
|
52 | })(AuthErrorTypes || (AuthErrorTypes = {}));
|
53 | export function isUsernamePasswordOpts(obj) {
|
54 | return !!obj.username;
|
55 | }
|
56 |
|
\ | No newline at end of file |