fix(auth): check for discord callback error status, update string copy
This commit is contained in:
parent
3fd397e858
commit
7dca30b57d
0
.editorconfig
Executable file → Normal file
0
.editorconfig
Executable file → Normal file
0
.env.example
Executable file → Normal file
0
.env.example
Executable file → Normal file
0
.gitattributes
vendored
Executable file → Normal file
0
.gitattributes
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Executable file → Normal file
0
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
0
.styleci.yml
Executable file → Normal file
0
.styleci.yml
Executable file → Normal file
0
CODEOWNERS
Executable file → Normal file
0
CODEOWNERS
Executable file → Normal file
0
CODE_OF_CONDUCT.md
Executable file → Normal file
0
CODE_OF_CONDUCT.md
Executable file → Normal file
0
CONTRIBUTING.md
Executable file → Normal file
0
CONTRIBUTING.md
Executable file → Normal file
0
Dockerfile
Executable file → Normal file
0
Dockerfile
Executable file → Normal file
0
SECURITY.md
Executable file → Normal file
0
SECURITY.md
Executable file → Normal file
0
app/Absence.php
Executable file → Normal file
0
app/Absence.php
Executable file → Normal file
0
app/Application.php
Executable file → Normal file
0
app/Application.php
Executable file → Normal file
0
app/Appointment.php
Executable file → Normal file
0
app/Appointment.php
Executable file → Normal file
0
app/Ban.php
Executable file → Normal file
0
app/Ban.php
Executable file → Normal file
0
app/Comment.php
Executable file → Normal file
0
app/Comment.php
Executable file → Normal file
0
app/Console/Commands/CountVotes.php
Executable file → Normal file
0
app/Console/Commands/CountVotes.php
Executable file → Normal file
0
app/Console/Commands/CreateUser.php
Executable file → Normal file
0
app/Console/Commands/CreateUser.php
Executable file → Normal file
0
app/Console/Commands/Install.php
Executable file → Normal file
0
app/Console/Commands/Install.php
Executable file → Normal file
0
app/Console/Commands/MakeFile.php
Executable file → Normal file
0
app/Console/Commands/MakeFile.php
Executable file → Normal file
0
app/Console/Commands/SetEnv.php
Executable file → Normal file
0
app/Console/Commands/SetEnv.php
Executable file → Normal file
0
app/Console/Kernel.php
Executable file → Normal file
0
app/Console/Kernel.php
Executable file → Normal file
0
app/CustomFacades/IP.php
Executable file → Normal file
0
app/CustomFacades/IP.php
Executable file → Normal file
0
app/Enums/Overrides.php
Executable file → Normal file
0
app/Enums/Overrides.php
Executable file → Normal file
0
app/Events/ApplicationApprovedEvent.php
Executable file → Normal file
0
app/Events/ApplicationApprovedEvent.php
Executable file → Normal file
0
app/Events/ApplicationDeniedEvent.php
Executable file → Normal file
0
app/Events/ApplicationDeniedEvent.php
Executable file → Normal file
0
app/Events/NewApplicationEvent.php
Executable file → Normal file
0
app/Events/NewApplicationEvent.php
Executable file → Normal file
0
app/Events/UserBannedEvent.php
Executable file → Normal file
0
app/Events/UserBannedEvent.php
Executable file → Normal file
0
app/Exceptions/AbsenceNotActionableException.php
Executable file → Normal file
0
app/Exceptions/AbsenceNotActionableException.php
Executable file → Normal file
0
app/Exceptions/AccountNotLinkedException.php
Executable file → Normal file
0
app/Exceptions/AccountNotLinkedException.php
Executable file → Normal file
0
app/Exceptions/ApplicationNotFoundException.php
Executable file → Normal file
0
app/Exceptions/ApplicationNotFoundException.php
Executable file → Normal file
0
app/Exceptions/DiscordAccountRequiredException.php
Executable file → Normal file
0
app/Exceptions/DiscordAccountRequiredException.php
Executable file → Normal file
0
app/Exceptions/EmptyFormException.php
Executable file → Normal file
0
app/Exceptions/EmptyFormException.php
Executable file → Normal file
0
app/Exceptions/EmptyOptionsException.php
Executable file → Normal file
0
app/Exceptions/EmptyOptionsException.php
Executable file → Normal file
0
app/Exceptions/FailedCaptchaException.php
Executable file → Normal file
0
app/Exceptions/FailedCaptchaException.php
Executable file → Normal file
0
app/Exceptions/FileUploadException.php
Executable file → Normal file
0
app/Exceptions/FileUploadException.php
Executable file → Normal file
0
app/Exceptions/FormHasConstraintsException.php
Executable file → Normal file
0
app/Exceptions/FormHasConstraintsException.php
Executable file → Normal file
0
app/Exceptions/Handler.php
Executable file → Normal file
0
app/Exceptions/Handler.php
Executable file → Normal file
0
app/Exceptions/IncompatibleAgeException.php
Executable file → Normal file
0
app/Exceptions/IncompatibleAgeException.php
Executable file → Normal file
0
app/Exceptions/IncompleteApplicationException.php
Executable file → Normal file
0
app/Exceptions/IncompleteApplicationException.php
Executable file → Normal file
0
app/Exceptions/InvalidAgeException.php
Executable file → Normal file
0
app/Exceptions/InvalidAgeException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentStatusException.php
Executable file → Normal file
0
app/Exceptions/InvalidAppointmentStatusException.php
Executable file → Normal file
0
app/Exceptions/InvalidGamePreferenceException.php
Executable file → Normal file
0
app/Exceptions/InvalidGamePreferenceException.php
Executable file → Normal file
0
app/Exceptions/InvalidInviteException.php
Executable file → Normal file
0
app/Exceptions/InvalidInviteException.php
Executable file → Normal file
0
app/Exceptions/OptionCategoryNotFoundException.php
Executable file → Normal file
0
app/Exceptions/OptionCategoryNotFoundException.php
Executable file → Normal file
0
app/Exceptions/OptionNotFoundException.php
Executable file → Normal file
0
app/Exceptions/OptionNotFoundException.php
Executable file → Normal file
0
app/Exceptions/ProfileAlreadyExistsException.php
Executable file → Normal file
0
app/Exceptions/ProfileAlreadyExistsException.php
Executable file → Normal file
0
app/Exceptions/ProfileCreationFailedException.php
Executable file → Normal file
0
app/Exceptions/ProfileCreationFailedException.php
Executable file → Normal file
0
app/Exceptions/ProfileNotFoundException.php
Executable file → Normal file
0
app/Exceptions/ProfileNotFoundException.php
Executable file → Normal file
0
app/Exceptions/PublicTeamInviteException.php
Executable file → Normal file
0
app/Exceptions/PublicTeamInviteException.php
Executable file → Normal file
0
app/Exceptions/UnavailableApplicationException.php
Executable file → Normal file
0
app/Exceptions/UnavailableApplicationException.php
Executable file → Normal file
0
app/Exceptions/UserAlreadyInvitedException.php
Executable file → Normal file
0
app/Exceptions/UserAlreadyInvitedException.php
Executable file → Normal file
0
app/Exceptions/VacancyNotFoundException.php
Executable file → Normal file
0
app/Exceptions/VacancyNotFoundException.php
Executable file → Normal file
0
app/Facades/ContextAwareValidation.php
Executable file → Normal file
0
app/Facades/ContextAwareValidation.php
Executable file → Normal file
0
app/Facades/DigitalStorageHelper.php
Executable file → Normal file
0
app/Facades/DigitalStorageHelper.php
Executable file → Normal file
0
app/Facades/Discord.php
Executable file → Normal file
0
app/Facades/Discord.php
Executable file → Normal file
0
app/Facades/IP.php
Executable file → Normal file
0
app/Facades/IP.php
Executable file → Normal file
0
app/Facades/JSON.php
Executable file → Normal file
0
app/Facades/JSON.php
Executable file → Normal file
0
app/Facades/Options.php
Executable file → Normal file
0
app/Facades/Options.php
Executable file → Normal file
0
app/Facades/UUID.php
Executable file → Normal file
0
app/Facades/UUID.php
Executable file → Normal file
0
app/Form.php
Executable file → Normal file
0
app/Form.php
Executable file → Normal file
0
app/Helpers/ContextAwareValidator.php
Executable file → Normal file
0
app/Helpers/ContextAwareValidator.php
Executable file → Normal file
0
app/Helpers/DigitalStorageHelper.php
Executable file → Normal file
0
app/Helpers/DigitalStorageHelper.php
Executable file → Normal file
0
app/Helpers/Discord.php
Executable file → Normal file
0
app/Helpers/Discord.php
Executable file → Normal file
0
app/Helpers/JSON.php
Executable file → Normal file
0
app/Helpers/JSON.php
Executable file → Normal file
0
app/Helpers/Options.php
Executable file → Normal file
0
app/Helpers/Options.php
Executable file → Normal file
0
app/Http/Controllers/AbsenceController.php
Executable file → Normal file
0
app/Http/Controllers/AbsenceController.php
Executable file → Normal file
0
app/Http/Controllers/ApplicationController.php
Executable file → Normal file
0
app/Http/Controllers/ApplicationController.php
Executable file → Normal file
0
app/Http/Controllers/AppointmentController.php
Executable file → Normal file
0
app/Http/Controllers/AppointmentController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ConfirmPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ConfirmPasswordController.php
Executable file → Normal file
10
app/Http/Controllers/Auth/DiscordController.php
Executable file → Normal file
10
app/Http/Controllers/Auth/DiscordController.php
Executable file → Normal file
@ -23,6 +23,8 @@ namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use GuzzleHttp\Exception\ClientException;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
@ -37,8 +39,13 @@ class DiscordController extends Controller
|
||||
->redirect();
|
||||
}
|
||||
|
||||
public function discordCallback()
|
||||
public function discordCallback(Request $request)
|
||||
{
|
||||
if($request->has('error'))
|
||||
{
|
||||
abort(401, __("Access Denied: To sign in with your Discord account or apply for positions requiring it, please ensure you authorize our application (:applicationName). We request permissions to manage your account, maintain it, and handle your permissions within our community servers. Feel free to read our Privacy Policy if you have any concerns.", ['applicationName' => config('app.name')]));
|
||||
}
|
||||
|
||||
try {
|
||||
$discordUser = Socialite::driver('discord')->user();
|
||||
} catch (InvalidStateException $stateException) {
|
||||
@ -49,6 +56,7 @@ class DiscordController extends Controller
|
||||
]);
|
||||
|
||||
return redirect(route('discordRedirect'));
|
||||
|
||||
}
|
||||
|
||||
$appUser = User::where('email', $discordUser->getEmail())->first();
|
||||
|
0
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ForgotPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/LoginController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/LoginController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/RegisterController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/RegisterController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/ResetPasswordController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/TwofaController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/TwofaController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/VerificationController.php
Executable file → Normal file
0
app/Http/Controllers/Auth/VerificationController.php
Executable file → Normal file
0
app/Http/Controllers/CommentController.php
Executable file → Normal file
0
app/Http/Controllers/CommentController.php
Executable file → Normal file
0
app/Http/Controllers/Controller.php
Executable file → Normal file
0
app/Http/Controllers/Controller.php
Executable file → Normal file
0
app/Http/Controllers/DashboardController.php
Executable file → Normal file
0
app/Http/Controllers/DashboardController.php
Executable file → Normal file
0
app/Http/Controllers/DevToolsController.php
Executable file → Normal file
0
app/Http/Controllers/DevToolsController.php
Executable file → Normal file
0
app/Http/Controllers/FormController.php
Executable file → Normal file
0
app/Http/Controllers/FormController.php
Executable file → Normal file
0
app/Http/Controllers/HomeController.php
Executable file → Normal file
0
app/Http/Controllers/HomeController.php
Executable file → Normal file
0
app/Http/Controllers/OptionsController.php
Executable file → Normal file
0
app/Http/Controllers/OptionsController.php
Executable file → Normal file
0
app/Http/Controllers/ProfileController.php
Executable file → Normal file
0
app/Http/Controllers/ProfileController.php
Executable file → Normal file
0
app/Http/Controllers/SecuritySettingsController.php
Executable file → Normal file
0
app/Http/Controllers/SecuritySettingsController.php
Executable file → Normal file
0
app/Http/Controllers/TeamController.php
Executable file → Normal file
0
app/Http/Controllers/TeamController.php
Executable file → Normal file
0
app/Http/Controllers/TeamFileController.php
Executable file → Normal file
0
app/Http/Controllers/TeamFileController.php
Executable file → Normal file
0
app/Http/Controllers/UserController.php
Executable file → Normal file
0
app/Http/Controllers/UserController.php
Executable file → Normal file
0
app/Http/Controllers/VacancyController.php
Executable file → Normal file
0
app/Http/Controllers/VacancyController.php
Executable file → Normal file
0
app/Http/Controllers/VoteController.php
Executable file → Normal file
0
app/Http/Controllers/VoteController.php
Executable file → Normal file
0
app/Http/Kernel.php
Executable file → Normal file
0
app/Http/Kernel.php
Executable file → Normal file
0
app/Http/Middleware/ApplicationEligibility.php
Executable file → Normal file
0
app/Http/Middleware/ApplicationEligibility.php
Executable file → Normal file
0
app/Http/Middleware/Authenticate.php
Executable file → Normal file
0
app/Http/Middleware/Authenticate.php
Executable file → Normal file
0
app/Http/Middleware/Bancheck.php
Executable file → Normal file
0
app/Http/Middleware/Bancheck.php
Executable file → Normal file
0
app/Http/Middleware/CheckForMaintenanceMode.php
Executable file → Normal file
0
app/Http/Middleware/CheckForMaintenanceMode.php
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user