Skip to content

Commit

Permalink
🐛 workaround user already signed in
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreMiras committed Dec 2, 2024
1 parent aaaaa80 commit bf10a6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ const headers = (jwtToken: string) => ({ Authorization: `Bearer ${jwtToken}` });
* Sign in to return the JWT token.
*/
const signIn = async (username: string, password: string): Promise<string> => {
// in case the user is already signed in, refs:
// https://github.com/aws-amplify/amplify-js/issues/13813
await amplifyAuth.signOut();
const { isSignedIn, nextStep } = await amplifyAuth.signIn({
username,
password,
Expand Down

0 comments on commit bf10a6d

Please sign in to comment.