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