diff --git a/.dockerignore b/.dockerignore index bbd93fb8b3..a7588f3c5f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,4 +5,5 @@ #bin docs .env -.env.example \ No newline at end of file +.env.example +rr \ No newline at end of file diff --git a/.gitignore b/.gitignore index e50cdd72f6..07eb2cda35 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ public/api-docs/* /caddy frankenphp frankenphp-worker.php +/rr diff --git a/app-modules/application/routes/api.php b/app-modules/application/routes/api.php index ccf087b085..c03d068f74 100644 --- a/app-modules/application/routes/api.php +++ b/app-modules/application/routes/api.php @@ -50,16 +50,16 @@ ->name('applications.') ->group(function () { Route::get('/{application}', [ApplicationWidgetController::class, 'view']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('define'); Route::post('/{application}/authenticate/request', [ApplicationWidgetController::class, 'requestAuthentication']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('request-authentication'); Route::post('/{application}/authenticate/{authentication}', [ApplicationWidgetController::class, 'authenticate']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('authenticate'); Route::post('/{application}/submit', [ApplicationWidgetController::class, 'store']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('submit'); }); }); diff --git a/app-modules/application/src/Http/Controllers/ApplicationWidgetController.php b/app-modules/application/src/Http/Controllers/ApplicationWidgetController.php index dd8edc3b45..81eab54bb0 100644 --- a/app-modules/application/src/Http/Controllers/ApplicationWidgetController.php +++ b/app-modules/application/src/Http/Controllers/ApplicationWidgetController.php @@ -65,7 +65,11 @@ public function view(GenerateFormKitSchema $generateSchema, Application $applica [ 'name' => $application->name, 'description' => $application->description, - 'authentication_url' => URL::signedRoute('applications.request-authentication', ['application' => $application]), + 'authentication_url' => URL::signedRoute( + name: 'applications.request-authentication', + parameters: ['application' => $application], + absolute: false, + ), 'schema' => $generateSchema($application), 'primary_color' => Color::all()[$application->primary_color ?? 'blue'], 'rounding' => $application->rounding, @@ -101,10 +105,14 @@ public function requestAuthentication(Request $request, ResolveSubmissionAuthorF return response()->json([ 'message' => "We've sent an authentication code to {$data['email']}.", - 'authentication_url' => URL::signedRoute('applications.authenticate', [ - 'application' => $application, - 'authentication' => $authentication, - ]), + 'authentication_url' => URL::signedRoute( + name: 'applications.authenticate', + parameters: [ + 'application' => $application, + 'authentication' => $authentication, + ], + absolute: false, + ), ]); } @@ -127,10 +135,14 @@ public function authenticate(Request $request, Application $application, Applica ]); return response()->json([ - 'submission_url' => URL::signedRoute('applications.submit', [ - 'authentication' => $authentication, - 'application' => $authentication->submissible, - ]), + 'submission_url' => URL::signedRoute( + name: 'applications.submit', + parameters: [ + 'authentication' => $authentication, + 'application' => $authentication->submissible, + ], + absolute: false, + ), ]); } diff --git a/app-modules/application/tests/ApplicationWidgetApiTest.php b/app-modules/application/tests/ApplicationWidgetApiTest.php index 66e9baf83b..c2b82c8f4a 100644 --- a/app-modules/application/tests/ApplicationWidgetApiTest.php +++ b/app-modules/application/tests/ApplicationWidgetApiTest.php @@ -62,7 +62,11 @@ $application = Application::factory()->create(); - get(URL::signedRoute('applications.define', ['application' => $application])) + get(URL::signedRoute( + name: 'applications.define', + parameters: ['application' => $application], + absolute: false, + )) ->assertForbidden() ->assertJson([ 'error' => 'Online Admissions is not enabled.', @@ -72,7 +76,11 @@ $settings->save(); - get(URL::signedRoute('applications.define', ['application' => $application])) + get(URL::signedRoute( + name: 'applications.define', + parameters: ['application' => $application], + absolute: false, + )) ->assertSuccessful(); }); @@ -91,7 +99,11 @@ $prospect = Prospect::factory()->create(); - post(URL::signedRoute('applications.request-authentication', ['application' => $application, 'email' => $prospect->email])) + post(URL::signedRoute( + name: 'applications.request-authentication', + parameters: ['application' => $application, 'email' => $prospect->email], + absolute: false, + )) ->assertForbidden() ->assertJson([ 'error' => 'Online Admissions is not enabled.', @@ -101,7 +113,11 @@ $settings->save(); - post(URL::signedRoute('applications.request-authentication', ['application' => $application, 'email' => $prospect->email])) + post(URL::signedRoute( + name: 'applications.request-authentication', + parameters: ['application' => $application, 'email' => $prospect->email], + absolute: false, + )) ->assertSuccessful(); }); @@ -125,7 +141,11 @@ 'code' => Hash::make($code), ]); - post(URL::signedRoute('applications.authenticate', ['application' => $application, 'authentication' => $authorization, 'code' => $code])) + post(URL::signedRoute( + name: 'applications.authenticate', + parameters: ['application' => $application, 'authentication' => $authorization, 'code' => $code], + absolute: false, + )) ->assertForbidden() ->assertJson([ 'error' => 'Online Admissions is not enabled.', @@ -135,7 +155,11 @@ $settings->save(); - post(URL::signedRoute('applications.authenticate', ['application' => $application, 'authentication' => $authorization, 'code' => $code])) + post(URL::signedRoute( + name: 'applications.authenticate', + parameters: ['application' => $application, 'authentication' => $authorization, 'code' => $code], + absolute: false, + )) ->assertSuccessful(); }); @@ -162,7 +186,11 @@ 'application_id' => $application->id, ]); - post(URL::signedRoute('applications.submit', ['application' => $application, 'authentication' => $authorization])) + post(URL::signedRoute( + name: 'applications.submit', + parameters: ['application' => $application, 'authentication' => $authorization], + absolute: false, + )) ->assertForbidden() ->assertJson([ 'error' => 'Online Admissions is not enabled.', @@ -172,6 +200,10 @@ $settings->save(); - post(URL::signedRoute('applications.submit', ['application' => $application, 'authentication' => $authorization])) + post(URL::signedRoute( + name: 'applications.submit', + parameters: ['application' => $application, 'authentication' => $authorization], + absolute: false, + )) ->assertSuccessful(); }); diff --git a/app-modules/authorization/routes/web.php b/app-modules/authorization/routes/web.php index ed9b1f10cb..1675401b65 100644 --- a/app-modules/authorization/routes/web.php +++ b/app-modules/authorization/routes/web.php @@ -48,5 +48,5 @@ Route::get('/auth/login/{user}', OneTimeLoginController::class) ->name('login.one-time') - ->middleware('signed'); + ->middleware('signed:relative'); }); diff --git a/app-modules/authorization/tests/Feature/Http/Controllers/Auth/OneTimeLoginControllerTest.php b/app-modules/authorization/tests/Feature/Http/Controllers/Auth/OneTimeLoginControllerTest.php index 2780c7241b..50e3a31154 100644 --- a/app-modules/authorization/tests/Feature/Http/Controllers/Auth/OneTimeLoginControllerTest.php +++ b/app-modules/authorization/tests/Feature/Http/Controllers/Auth/OneTimeLoginControllerTest.php @@ -50,7 +50,11 @@ assertGuest(); - get(URL::signedRoute('login.one-time', ['user' => $user])) + get(URL::signedRoute( + name: 'login.one-time', + parameters: ['user' => $user], + absolute: false, + )) ->assertRedirect(); assertAuthenticatedAs($user); diff --git a/app-modules/form/routes/api.php b/app-modules/form/routes/api.php index a270269166..1ca00b649e 100644 --- a/app-modules/form/routes/api.php +++ b/app-modules/form/routes/api.php @@ -49,16 +49,16 @@ ->name('forms.') ->group(function () { Route::get('/{form}', [FormWidgetController::class, 'view']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('define'); Route::post('/{form}/authenticate/request', [FormWidgetController::class, 'requestAuthentication']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('request-authentication'); Route::post('/{form}/authenticate/{authentication}', [FormWidgetController::class, 'authenticate']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('authenticate'); Route::post('/{form}/submit', [FormWidgetController::class, 'store']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('submit'); }); }); diff --git a/app-modules/form/src/Actions/GenerateSubmissibleEmbedCode.php b/app-modules/form/src/Actions/GenerateSubmissibleEmbedCode.php index c417408789..3043ea00e5 100644 --- a/app-modules/form/src/Actions/GenerateSubmissibleEmbedCode.php +++ b/app-modules/form/src/Actions/GenerateSubmissibleEmbedCode.php @@ -53,7 +53,11 @@ public function handle(Submissible $submissible): string return match ($submissible::class) { Form::class => (function () use ($submissible) { $scriptUrl = url('js/widgets/form/advising-app-form-widget.js?'); - $formDefinitionUrl = URL::signedRoute('forms.define', ['form' => $submissible]); + $formDefinitionUrl = URL::signedRoute( + name: 'forms.define', + parameters: ['form' => $submissible], + absolute: false, + ); return << @@ -62,7 +66,11 @@ public function handle(Submissible $submissible): string })(), Application::class => (function () use ($submissible) { $scriptUrl = url('js/widgets/application/advising-app-application-widget.js?'); - $applicationDefinitionUrl = URL::signedRoute('applications.define', ['application' => $submissible]); + $applicationDefinitionUrl = URL::signedRoute( + name: 'applications.define', + parameters: ['application' => $submissible], + absolute: false, + ); return << @@ -71,7 +79,11 @@ public function handle(Submissible $submissible): string })(), Survey::class => (function () use ($submissible) { $scriptUrl = url('js/widgets/survey/advising-app-survey-widget.js?'); - $surveyDefinitionUrl = URL::signedRoute('surveys.define', ['survey' => $submissible]); + $surveyDefinitionUrl = URL::signedRoute( + name: 'surveys.define', + parameters: ['survey' => $submissible], + absolute: false, + ); return << @@ -81,7 +93,11 @@ public function handle(Submissible $submissible): string EventRegistrationForm::class => (function () use ($submissible) { /** @var EventRegistrationForm $submissible */ $scriptUrl = url('js/widgets/events/advising-app-event-registration-form-widget.js?'); - $formDefinitionUrl = URL::signedRoute('event-registration.define', ['event' => $submissible->event]); + $formDefinitionUrl = URL::signedRoute( + name: 'event-registration.define', + parameters: ['event' => $submissible->event], + absolute: false, + ); return << @@ -91,7 +107,11 @@ public function handle(Submissible $submissible): string ServiceRequestForm::class => (function () use ($submissible) { /** @var ServiceRequestForm $submissible */ $scriptUrl = url('js/widgets/service-request-form/advising-app-service-request-form-widget.js?'); - $formDefinitionUrl = URL::signedRoute('service-request-forms.define', ['serviceRequestForm' => $submissible]); + $formDefinitionUrl = URL::signedRoute( + name: 'service-request-forms.define', + parameters: ['serviceRequestForm' => $submissible], + absolute: false, + ); return << diff --git a/app-modules/form/src/Http/Controllers/FormWidgetController.php b/app-modules/form/src/Http/Controllers/FormWidgetController.php index 62bed33d50..f65fe15707 100644 --- a/app-modules/form/src/Http/Controllers/FormWidgetController.php +++ b/app-modules/form/src/Http/Controllers/FormWidgetController.php @@ -68,9 +68,17 @@ public function view(GenerateFormKitSchema $generateSchema, Form $form): JsonRes 'description' => $form->description, 'is_authenticated' => $form->is_authenticated, ...($form->is_authenticated ? [ - 'authentication_url' => URL::signedRoute('forms.request-authentication', ['form' => $form]), + 'authentication_url' => URL::signedRoute( + name: 'forms.request-authentication', + parameters: ['form' => $form], + absolute: false, + ), ] : [ - 'submission_url' => URL::signedRoute('forms.submit', ['form' => $form]), + 'submission_url' => URL::signedRoute( + name: 'forms.submit', + parameters: ['form' => $form], + absolute: false, + ), ]), 'recaptcha_enabled' => $form->recaptcha_enabled, ...($form->recaptcha_enabled ? [ @@ -112,10 +120,14 @@ public function requestAuthentication(Request $request, ResolveSubmissionAuthorF return response()->json([ 'message' => "We've sent an authentication code to {$data['email']}.", - 'authentication_url' => URL::signedRoute('forms.authenticate', [ - 'form' => $form, - 'authentication' => $authentication, - ]), + 'authentication_url' => URL::signedRoute( + name: 'forms.authenticate', + parameters: [ + 'form' => $form, + 'authentication' => $authentication, + ], + absolute: false, + ), ]); } @@ -138,10 +150,14 @@ public function authenticate(Request $request, Form $form, FormAuthentication $a ]); return response()->json([ - 'submission_url' => URL::signedRoute('forms.submit', [ - 'authentication' => $authentication, - 'form' => $authentication->submissible, - ]), + 'submission_url' => URL::signedRoute( + name: 'forms.submit', + parameters: [ + 'authentication' => $authentication, + 'form' => $authentication->submissible, + ], + absolute: false, + ), ]); } diff --git a/app-modules/meeting-center/routes/api.php b/app-modules/meeting-center/routes/api.php index 7b4144d591..618f995d52 100644 --- a/app-modules/meeting-center/routes/api.php +++ b/app-modules/meeting-center/routes/api.php @@ -47,16 +47,16 @@ ->name('event-registration.') ->group(function () { Route::get('/{event}', [EventRegistrationWidgetController::class, 'view']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('define'); Route::post('/{event}/authenticate/request', [EventRegistrationWidgetController::class, 'requestAuthentication']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('request-authentication'); Route::post('/{event}/authenticate/{authentication}', [EventRegistrationWidgetController::class, 'authenticate']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('authenticate'); Route::post('/{event}/submit', [EventRegistrationWidgetController::class, 'store']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('submit'); }); }); diff --git a/app-modules/meeting-center/src/Http/Controllers/EventRegistrationWidgetController.php b/app-modules/meeting-center/src/Http/Controllers/EventRegistrationWidgetController.php index 8f318f635e..dbf4cca7d5 100644 --- a/app-modules/meeting-center/src/Http/Controllers/EventRegistrationWidgetController.php +++ b/app-modules/meeting-center/src/Http/Controllers/EventRegistrationWidgetController.php @@ -70,7 +70,11 @@ public function view(GenerateEventRegistrationFormKitSchema $generateSchema, Eve 'name' => $form->event->title, 'description' => $form->event->description, 'is_authenticated' => true, - 'authentication_url' => URL::signedRoute('event-registration.request-authentication', ['event' => $event]), + 'authentication_url' => URL::signedRoute( + name: 'event-registration.request-authentication', + parameters: ['event' => $event], + absolute: false, + ), 'recaptcha_enabled' => $form->recaptcha_enabled, ...($form->recaptcha_enabled ? [ 'recaptcha_site_key' => app(GoogleRecaptchaSettings::class)->site_key, @@ -116,10 +120,14 @@ public function requestAuthentication(Request $request, Event $event): JsonRespo return response()->json([ 'message' => "We've sent an authentication code to {$attendee->email}.", - 'authentication_url' => URL::signedRoute('event-registration.authenticate', [ - 'event' => $event, - 'authentication' => $authentication, - ]), + 'authentication_url' => URL::signedRoute( + name: 'event-registration.authenticate', + parameters: [ + 'event' => $event, + 'authentication' => $authentication, + ], + absolute: false, + ), ]); } @@ -142,10 +150,14 @@ public function authenticate(Request $request, Event $event, EventRegistrationFo ]); return response()->json([ - 'submission_url' => URL::signedRoute('event-registration.submit', [ - 'authentication' => $authentication, - 'event' => $authentication->submissible->event, - ]), + 'submission_url' => URL::signedRoute( + name: 'event-registration.submit', + parameters: [ + 'authentication' => $authentication, + 'event' => $authentication->submissible->event, + ], + absolute: false, + ), ]); } diff --git a/app-modules/portal/routes/api.php b/app-modules/portal/routes/api.php index a5ebb7658b..bf3aac589c 100644 --- a/app-modules/portal/routes/api.php +++ b/app-modules/portal/routes/api.php @@ -53,10 +53,10 @@ ->name('portal.knowledge-management.') ->group(function () { Route::get('/', [KnowledgeManagementPortalController::class, 'show']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('define'); Route::post('/search', [KnowledgeManagementPortalSearchController::class, 'get']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('search'); Route::get('/categories/{category}', [KnowledgeManagementPortalCategoryController::class, 'show']) ->name('category.show'); diff --git a/app-modules/portal/src/Actions/GeneratePortalEmbedCode.php b/app-modules/portal/src/Actions/GeneratePortalEmbedCode.php index 4817005f3e..1f1d84e338 100644 --- a/app-modules/portal/src/Actions/GeneratePortalEmbedCode.php +++ b/app-modules/portal/src/Actions/GeneratePortalEmbedCode.php @@ -48,8 +48,14 @@ public function handle(PortalType $portal): string PortalType::KnowledgeManagement => (function () { $scriptUrl = url('js/portals/knowledge-management/advising-app-knowledge-management-portal.js?'); $portalAccessUrl = route('portals.knowledge-management.show'); - $portalDefinitionUrl = URL::signedRoute('portal.knowledge-management.define'); - $portalSearchUrl = URL::signedRoute('portal.knowledge-management.search'); + $portalDefinitionUrl = URL::signedRoute( + name: 'portal.knowledge-management.define', + absolute: false, + ); + $portalSearchUrl = URL::signedRoute( + name: 'portal.knowledge-management.search', + absolute: false, + ); $appUrl = parse_url(config('app.url'))['host']; $apiUrl = route('portal.knowledge-management.define'); diff --git a/app-modules/service-management/routes/api.php b/app-modules/service-management/routes/api.php index 9caf601d41..367232d513 100644 --- a/app-modules/service-management/routes/api.php +++ b/app-modules/service-management/routes/api.php @@ -50,16 +50,16 @@ ->name('service-request-forms.') ->group(function () { Route::get('/{serviceRequestForm}', [ServiceRequestFormWidgetController::class, 'view']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('define'); Route::post('/{serviceRequestForm}/authenticate/request', [ServiceRequestFormWidgetController::class, 'requestAuthentication']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('request-authentication'); Route::post('/{serviceRequestForm}/authenticate/{authentication}', [ServiceRequestFormWidgetController::class, 'authenticate']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('authenticate'); Route::post('/{serviceRequestForm}/submit', [ServiceRequestFormWidgetController::class, 'store']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('submit'); }); }); diff --git a/app-modules/service-management/src/Http/Controllers/ServiceRequestFormWidgetController.php b/app-modules/service-management/src/Http/Controllers/ServiceRequestFormWidgetController.php index dc0c61dbd6..9e58e3942c 100644 --- a/app-modules/service-management/src/Http/Controllers/ServiceRequestFormWidgetController.php +++ b/app-modules/service-management/src/Http/Controllers/ServiceRequestFormWidgetController.php @@ -68,9 +68,17 @@ public function view(GenerateServiceRequestFormKitSchema $generateSchema, Servic 'description' => $serviceRequestForm->description, 'is_authenticated' => $serviceRequestForm->is_authenticated, ...($serviceRequestForm->is_authenticated ? [ - 'authentication_url' => URL::signedRoute('service-request-forms.request-authentication', ['serviceRequestForm' => $serviceRequestForm]), + 'authentication_url' => URL::signedRoute( + name: 'service-request-forms.request-authentication', + parameters: ['serviceRequestForm' => $serviceRequestForm], + absolute: false + ), ] : [ - 'submission_url' => URL::signedRoute('service-request-forms.submit', ['serviceRequestForm' => $serviceRequestForm]), + 'submission_url' => URL::signedRoute( + name: 'service-request-forms.submit', + parameters: ['serviceRequestForm' => $serviceRequestForm], + absolute: false + ), ]), 'recaptcha_enabled' => $serviceRequestForm->recaptcha_enabled, ...($serviceRequestForm->recaptcha_enabled ? [ @@ -111,10 +119,14 @@ public function requestAuthentication(Request $request, ResolveSubmissionAuthorF return response()->json([ 'message' => "We've sent an authentication code to {$data['email']}.", - 'authentication_url' => URL::signedRoute('service-request-forms.authenticate', [ - 'serviceRequestForm' => $serviceRequestForm, - 'authentication' => $authentication, - ]), + 'authentication_url' => URL::signedRoute( + name: 'service-request-forms.authenticate', + parameters: [ + 'serviceRequestForm' => $serviceRequestForm, + 'authentication' => $authentication, + ], + absolute: false + ), ]); } @@ -137,10 +149,14 @@ public function authenticate(Request $request, ServiceRequestForm $serviceReques ]); return response()->json([ - 'submission_url' => URL::signedRoute('service-request-forms.submit', [ - 'authentication' => $authentication, - 'serviceRequestForm' => $authentication->submissible, - ]), + 'submission_url' => URL::signedRoute( + name: 'service-request-forms.submit', + parameters: [ + 'authentication' => $authentication, + 'serviceRequestForm' => $authentication->submissible, + ], + absolute: false + ), ]); } diff --git a/app-modules/survey/routes/api.php b/app-modules/survey/routes/api.php index 6d5713e2ba..5827d2bc23 100644 --- a/app-modules/survey/routes/api.php +++ b/app-modules/survey/routes/api.php @@ -49,16 +49,16 @@ ->name('surveys.') ->group(function () { Route::get('/{survey}', [SurveyWidgetController::class, 'view']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('define'); Route::post('/{survey}/authenticate/request', [SurveyWidgetController::class, 'requestAuthentication']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('request-authentication'); Route::post('/{survey}/authenticate/{authentication}', [SurveyWidgetController::class, 'authenticate']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('authenticate'); Route::post('/{survey}/submit', [SurveyWidgetController::class, 'store']) - ->middleware(['signed']) + ->middleware(['signed:relative']) ->name('submit'); }); }); diff --git a/app-modules/survey/src/Http/Controllers/SurveyWidgetController.php b/app-modules/survey/src/Http/Controllers/SurveyWidgetController.php index ff4b832817..c30c272063 100644 --- a/app-modules/survey/src/Http/Controllers/SurveyWidgetController.php +++ b/app-modules/survey/src/Http/Controllers/SurveyWidgetController.php @@ -68,9 +68,17 @@ public function view(GenerateFormKitSchema $generateSchema, Survey $survey): Jso 'description' => $survey->description, 'is_authenticated' => $survey->is_authenticated, ...($survey->is_authenticated ? [ - 'authentication_url' => URL::signedRoute('surveys.request-authentication', ['survey' => $survey]), + 'authentication_url' => URL::signedRoute( + name: 'surveys.request-authentication', + parameters: ['survey' => $survey], + absolute: false, + ), ] : [ - 'submission_url' => URL::signedRoute('surveys.submit', ['survey' => $survey]), + 'submission_url' => URL::signedRoute( + name: 'surveys.submit', + parameters: ['survey' => $survey], + absolute: false + ), ]), 'recaptcha_enabled' => $survey->recaptcha_enabled, ...($survey->recaptcha_enabled ? [ @@ -111,10 +119,14 @@ public function requestAuthentication(Request $request, ResolveSubmissionAuthorF return response()->json([ 'message' => "We've sent an authentication code to {$data['email']}.", - 'authentication_url' => URL::signedRoute('surveys.authenticate', [ - 'survey' => $survey, - 'authentication' => $authentication, - ]), + 'authentication_url' => URL::signedRoute( + name: 'surveys.authenticate', + parameters: [ + 'survey' => $survey, + 'authentication' => $authentication, + ], + absolute: false + ), ]); } @@ -137,10 +149,14 @@ public function authenticate(Request $request, Survey $survey, SurveyAuthenticat ]); return response()->json([ - 'submission_url' => URL::signedRoute('surveys.submit', [ - 'authentication' => $authentication, - 'survey' => $authentication->submissible, - ]), + 'submission_url' => URL::signedRoute( + name: 'surveys.submit', + parameters: [ + 'authentication' => $authentication, + 'survey' => $authentication->submissible, + ], + absolute: false + ), ]); } diff --git a/app/Notifications/SetPasswordNotification.php b/app/Notifications/SetPasswordNotification.php index 833f3af3e3..6436131398 100644 --- a/app/Notifications/SetPasswordNotification.php +++ b/app/Notifications/SetPasswordNotification.php @@ -54,9 +54,10 @@ public function toEmail(object $notifiable): MailMessage ->settings($this->resolveNotificationSetting($notifiable)) ->line('A new account has been created for you.') ->action('Set up your password', URL::temporarySignedRoute( - 'login.one-time', - now()->addDay(), - ['user' => $notifiable], + name: 'login.one-time', + expiration: now()->addDay(), + parameters: ['user' => $notifiable], + absolute: false, )) ->line('For security reasons, this link will expire in 24 hours.') ->line('Please contact support if you need a new link or have any issues setting up your account.'); diff --git a/rr b/rr deleted file mode 100755 index 5208f661b6..0000000000 Binary files a/rr and /dev/null differ