edilkamin 1.3.1 → 1.3.2

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/dist/library.js CHANGED
@@ -62,6 +62,9 @@ const headers = (jwtToken) => ({ Authorization: `Bearer ${jwtToken}` });
62
62
  * Sign in to return the JWT token.
63
63
  */
64
64
  const signIn = (username, password) => __awaiter(void 0, void 0, void 0, function* () {
65
+ // in case the user is already signed in, refs:
66
+ // https://github.com/aws-amplify/amplify-js/issues/13813
67
+ yield amplifyAuth.signOut();
65
68
  const { isSignedIn, nextStep } = yield amplifyAuth.signIn({
66
69
  username,
67
70
  password,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edilkamin",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/library.ts CHANGED
@@ -18,6 +18,9 @@ const headers = (jwtToken: string) => ({ Authorization: `Bearer ${jwtToken}` });
18
18
  * Sign in to return the JWT token.
19
19
  */
20
20
  const signIn = async (username: string, password: string): Promise<string> => {
21
+ // in case the user is already signed in, refs:
22
+ // https://github.com/aws-amplify/amplify-js/issues/13813
23
+ await amplifyAuth.signOut();
21
24
  const { isSignedIn, nextStep } = await amplifyAuth.signIn({
22
25
  username,
23
26
  password,