Fix 3rd-party auth issues

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-07-06 17:33:40 +02:00
parent 1d2038c9a0
commit 69841cbb45
7 changed files with 36 additions and 4 deletions

View File

@@ -54,6 +54,9 @@
<span v-if="error === LoginError.USER_DOES_NOT_EXIST">{{
$t("No user account with this email was found. Maybe you made a typo?")
}}</span>
<span v-if="error === LoginError.USER_DISABLED">
{{ $t("This user has been disabled") }}
</span>
</b-message>
<form @submit="loginAction">
<b-field :label="$t('Email')" label-for="email">

View File

@@ -19,7 +19,14 @@
:key="error"
@close="removeError(error)"
>
{{ error }}
<span v-if="error == ResetError.USER_IMPOSSIBLE_TO_RESET">
{{
$t(
"You can't reset your password because you use a 3rd-party auth provider to login."
)
}}
</span>
<span v-else>{{ error }}</span>
</b-message>
<form @submit="sendResetPasswordTokenAction" v-if="!validationSent">
<b-field :label="$t('Email address')">
@@ -52,6 +59,7 @@ import { Component, Prop, Vue } from "vue-property-decorator";
import { validateEmailField, validateRequiredField } from "../../utils/validators";
import { SEND_RESET_PASSWORD } from "../../graphql/auth";
import RouteName from "../../router/name";
import { ResetError } from "../../types/login-error-code.model";
@Component
export default class SendPasswordReset extends Vue {
@@ -67,6 +75,8 @@ export default class SendPasswordReset extends Vue {
errors: string[] = [];
ResetError = ResetError;
state = {
email: {
status: null,