Skip to content

Commit

Permalink
Merge pull request #133 from warcooft/feat-2
Browse files Browse the repository at this point in the history
feat: Returns the user's email if the account is not found.
  • Loading branch information
datamweb committed Jul 28, 2024
2 parents afdd769 + e6b6528 commit 1f36be9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Controllers/OAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function callBack(): RedirectResponse
if ($this->checkExistenceUser($find) === false) {
// Check config setting first to see if it can register automatically or not
if (config('ShieldOAuthConfig')->oauthConfigs[$oauthName]['allow_register'] === false) {
return redirect()->to(config('Auth')->logoutRedirect())->with('error', lang('ShieldOAuthLang.Callback.account_not_found'));
return redirect()->to(config('Auth')->logoutRedirect())->with('error', lang('ShieldOAuthLang.Callback.account_not_found', [$userInfo->email]));
}

helper('text');
Expand Down
2 changes: 1 addition & 1 deletion src/Language/en/ShieldOAuthLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'Callback' => [
'oauth_class_not_set' => 'An error occurred, it seems that the OAuth Class is not set.',
'anti_forgery' => 'Your request has been detected as fake. we are sorry!',
'account_not_found' => 'Your account not found. Please register first!',
'account_not_found' => 'There is no account registered with the email "{0}".',
],

// ShieldOAuthButton in views
Expand Down
2 changes: 1 addition & 1 deletion src/Language/fa/ShieldOAuthLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'Callback' => [
'oauth_class_not_set' => 'خطای رخ داد، به نظر میرسد کلاس OAuth مورد نظر به درستی تنظیم نشده است.',
'anti_forgery' => 'متاسفانه، تلاش شما ، یک درخواست جعلی تشخیص داده شد.',
'account_not_found' => 'اکانت پیدا نشد. لطفا ابتدا ثبت نام کنید!',
'account_not_found' => 'هیچ حسابی با ایمیل "{0}" ثبت نشده است.',
],

// ShieldOAuthButton in views
Expand Down
2 changes: 1 addition & 1 deletion src/Language/fr/ShieldOAuthLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'Callback' => [
'oauth_class_not_set' => 'Une erreur s’est produite, il semble que la classe OAuth n’est pas définie.',
'anti_forgery' => 'Votre demande a été détectée comme erronée. Nous sommes désolés!',
'account_not_found' => '(To be translated) Your account not found. Please register first!',
'account_not_found' => 'Il n\'y a pas de compte enregistré avec l\'email "{0}".',
],

// ShieldOAuthButton in views
Expand Down
2 changes: 1 addition & 1 deletion src/Language/id/ShieldOAuthLang.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'Callback' => [
'oauth_class_not_set' => 'Terjadi kesalahan, sepertinya class OAuth tidak terpasang.',
'anti_forgery' => 'Maaf, permintaan Anda terdeteksi tidak valid!',
'account_not_found' => 'Akun tidak ditemukan, silakan mendaftar terlebih dahulu!',
'account_not_found' => 'Tidak ada akun yang terdaftar dengan email "{0}".',
],

// ShieldOAuthButton in views
Expand Down

0 comments on commit 1f36be9

Please sign in to comment.