@vardario/cognito-client 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser.js +6 -8
- package/lib/cognito-client.d.ts +8 -10
- package/lib/cognito-client.js +7 -10
- package/package.json +1 -1
package/lib/browser.js
CHANGED
|
@@ -803,14 +803,12 @@ var ServiceTarget = /* @__PURE__ */ ((ServiceTarget2) => {
|
|
|
803
803
|
ServiceTarget2["ListWebAuthnCredentials"] = "ListWebAuthnCredentials";
|
|
804
804
|
return ServiceTarget2;
|
|
805
805
|
})(ServiceTarget || {});
|
|
806
|
-
var IdentityProvider =
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
return IdentityProvider2;
|
|
813
|
-
})(IdentityProvider || {});
|
|
806
|
+
var IdentityProvider = {
|
|
807
|
+
Cognito: "COGNITO",
|
|
808
|
+
Google: "Google",
|
|
809
|
+
Facebook: "Facebook",
|
|
810
|
+
Apple: "SignInWithApple"
|
|
811
|
+
};
|
|
814
812
|
function adaptExpiresIn(auth) {
|
|
815
813
|
return {
|
|
816
814
|
...auth,
|
package/lib/cognito-client.d.ts
CHANGED
|
@@ -323,16 +323,14 @@ export interface ListDevicesResponse {
|
|
|
323
323
|
PaginationToken?: string;
|
|
324
324
|
}
|
|
325
325
|
/**
|
|
326
|
-
* Cognito
|
|
327
|
-
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html for more information.
|
|
326
|
+
* Cognito built in identity providers.
|
|
328
327
|
*/
|
|
329
|
-
export declare
|
|
330
|
-
Cognito
|
|
331
|
-
Google
|
|
332
|
-
Facebook
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
328
|
+
export declare const IdentityProvider: {
|
|
329
|
+
Cognito: string;
|
|
330
|
+
Google: string;
|
|
331
|
+
Facebook: string;
|
|
332
|
+
Apple: string;
|
|
333
|
+
};
|
|
336
334
|
export interface AuthenticationResult {
|
|
337
335
|
AccessToken: string;
|
|
338
336
|
ExpiresIn: number;
|
|
@@ -770,7 +768,7 @@ export declare class CognitoClient {
|
|
|
770
768
|
*
|
|
771
769
|
* @throws {Error}
|
|
772
770
|
*/
|
|
773
|
-
generateOAuthSignInUrl(identityProvider?:
|
|
771
|
+
generateOAuthSignInUrl(identityProvider?: string): Promise<{
|
|
774
772
|
url: string;
|
|
775
773
|
state: string;
|
|
776
774
|
pkce: string;
|
package/lib/cognito-client.js
CHANGED
|
@@ -29,17 +29,14 @@ export var ServiceTarget;
|
|
|
29
29
|
ServiceTarget["ListWebAuthnCredentials"] = "ListWebAuthnCredentials";
|
|
30
30
|
})(ServiceTarget || (ServiceTarget = {}));
|
|
31
31
|
/**
|
|
32
|
-
* Cognito
|
|
33
|
-
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html for more information.
|
|
32
|
+
* Cognito built in identity providers.
|
|
34
33
|
*/
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
IdentityProvider["Apple"] = "SignInWithApple";
|
|
42
|
-
})(IdentityProvider || (IdentityProvider = {}));
|
|
34
|
+
export const IdentityProvider = {
|
|
35
|
+
Cognito: 'COGNITO',
|
|
36
|
+
Google: 'Google',
|
|
37
|
+
Facebook: 'Facebook',
|
|
38
|
+
Apple: 'SignInWithApple'
|
|
39
|
+
};
|
|
43
40
|
export function adaptExpiresIn(auth) {
|
|
44
41
|
// Cognito returns expiresIn in seconds, but we want it in milliseconds from now
|
|
45
42
|
return {
|