SymfonyCasts / verify-email-bundle

Simple, stylish Email Verification for Symfony
https://symfonycasts.com
MIT License
408 stars 33 forks source link

How can https be disabled for testing? #145

Closed razeta closed 1 year ago

razeta commented 1 year ago

Hello, I want to generate the signature without https, is this posible? I'm doing testing and I don't want to pay for https service yet.

$signatureComponents = $this->verifyEmailHelper->generateSignature(
    $verifyEmailRouteName,
    $user->getId(),
    $user->getEmail(),
    ['id' => $user->getId()]
);

Thanks.

bocharsky-bw commented 1 year ago

I suppose the HTTPS link is generated because your app works over the HTTPS protocol. If you're using Symfony built-in web server, i.e. run your app with symfony serve command, pass the --no-tls option to it, i.e. run symfony serve --no-tls and it will be served via HTTP, and the generateSignature() will return you HTTP link too.

I'm closing it because mostly this question is not about this specific bundle but about the Symfony application in general, you just need to run the app though HTTP as I mentioned above. Another workaround is to skip protocol checking in your tests, or just replace HTTPS with HTTP in that link in case you just checking the link without opening it