crater-invoice/crater

Public invoices redirects to login page

JeroenSteen opened this issue · 1 comments

Describe the bug
A clear and concise description of what the bug is.
When I send the public link of a invoice to a customer the customer is being redirected to the login page, instead of seeing the invoice. I also notice that invoices are overdue when they actually aren't.

Expected behavior
A clear and concise description of what you expected to happen.

I want to make the public invoice public for a limited time, let's say for a month. I know that their is a feature for this, but the customer can't send the invoice on the same say. I tried turning the feature of for limiting the public time, but no luck.

Screenshots
If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • Crater version: Wish I could see it in the dashboard somewhere
  • PHP version: PHP 8
  • Database type and version: MySQL

Optional info

  • OS: [e.g. Ubuntu] Windows PC
  • Browser: [e.g. chrome, safari] Chrome

Edit:
I'm aware of Http/Middleware/PdfMiddleware.php, can that file be adjusted to have the PDF publicly viewable for a short time? Or does the customer always needs to be logged in refering to Auth::guard('customer')->check()

This has been happening to me as well. I was unaware of it until I viewed the URL my self and was asked to login.

Version 6.0.6