Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,16 @@ const authSignup = async (config: Config): Promise<string> => {
break;
} catch (err) {
const errorMessage = String((err as ProtocolError).response?.data);
warn(errorMessage);

if (errorMessage.includes('Account already exists')) {
info(
'This email is already associated with an account. Please log in instead.'
);
return await authLogin(config);
}

warn(errorMessage);

email = password = passwordConfirmation = userAlias = '';

await askData();
Expand Down