maize-tech / laravel-magic-login

Easily add passwordless authentication into your application
MIT License
130 stars 12 forks source link

PRODUCTION FAIL WITH 403 INVALID SIGNATURE. #22

Open code-jambo opened 5 months ago

code-jambo commented 5 months ago

Hey, I am facing an issue with the package, it works fine on localhost but once the app is on a live server it does not authenticate instead fails with "403 INVALID SIGNATURE."

RicardoPBarbosa commented 5 months ago

@code-jambo I've solved it by adding this line from laravel docs: https://laravel.com/docs/11.x/requests#trusting-all-proxies

In my case, I am deploying to fly.io which means it must be falling under the "cloud" load balancer provider category that the documentation is saying this piece of code is for.

Let me know if it solves your issue.

riccardodallavia commented 5 months ago

Hi @code-jambo, what @RicardoPBarbosa should work!

In case you're using a version of Laravel prior to 11.x, all you have to do is update the TrustProxies.php middleware file: protected $proxies = '*';