crater icon indicating copy to clipboard operation
crater copied to clipboard

User is auto logged-in when hitting the crater URL directly after recording a payment and logout.

Open gokultw opened this issue 2 years ago • 8 comments

Describe the bug User is auto logged-in when hitting the crater URL directly after recording a payment and logout.

Steps to Reproduce

  1. Goto https://demo.craterapp.com/
  2. Enter email & password, Click login
  3. Click on Payments and click on Add Payment
  4. Select Customer(Add if there are no customer) & enter value in amount field
  5. Click on save payment
  6. Click on user icon and click on logout (User is navigated to https://demo.craterapp.com/login & login screen Displayed)
  7. Enter the URL "https://demo.craterapp.com/" in address bar and hit Enter key OR Refresh the page.

Expected behavior Login Page should be displayed

Actual behavior User is navigated to dashboard with URL https://demo.craterapp.com/admin/dashboard

Please complete the following information:

  • Crater version: 6.0.4

Optional info

  • OS: mac
  • Browser: chrome

gokultw avatar Aug 10 '22 05:08 gokultw

You do realise that the crater demo app (available via crater website) is specifically designed to auto login users, perhaps that's what happened?

I have a demo that is designed to act like a normal crater install (please be advised that it resets every 2 hours, so all data gets lost). use this link: https://crater.demo.griffin-studio.dev/: Username: [email protected] Password: crater@123

If you experience the same issue please confirm below, however if not please close this issue.

rihards-simanovics avatar Aug 10 '22 07:08 rihards-simanovics

You do realise that the crater demo app (available via crater website) is specifically designed to auto login users, perhaps that's what happened?

I have a demo that is designed to act like a normal crater install (please be advised that it resets every 2 hours, so all data gets lost). use this link: https://crater.demo.griffin-studio.dev/: Username: [email protected] Password: crater@123

If you experience the same issue please confirm below, however if not please close this issue.

Same issue observed, please follow the steps to reproduce.

gokultw avatar Aug 10 '22 08:08 gokultw

ok let me try it as well on another install that doesn't get reset.

rihards-simanovics avatar Aug 10 '22 08:08 rihards-simanovics

@gokultw well done, this is a nice catch! To expand on the test, the same issue happens on Invoice and Estimates submission. Expenses surprisingly are not affected, despite also having similar options. @mohitpanjwani, any ideas what might cause this?

rihards-simanovics avatar Aug 10 '22 08:08 rihards-simanovics

Any update on this ?

gokultw avatar Aug 12 '22 15:08 gokultw

@rihards-simanovics, Is Anyone looking into this issue?

gokultw avatar Aug 24 '22 05:08 gokultw

Hi @gokultw, I'm afraid I can't say, as I am not part of maintainers for this project, I only support the community by answering questions and directing to workable solutions. Also, this issue only seems to happen after you sign in from the same browser (and only within a limited period) so I can't see it being a hight priority right now.

rihards-simanovics avatar Aug 24 '22 06:08 rihards-simanovics

This issue seems to be happening when you click on logout from one of the view pages.

On view page, we have a watcher which fires whenever the route changes in order to fetch the payment/invoice but it fires when you click on logout too which causes the cookie to be set again after it's logged out and thus the logout action doesn't work as it should.

We'll fix it on the next minor release.

CleanShot 2022-09-01 at 14 11 29@2x

mohitpanjwani avatar Sep 01 '22 08:09 mohitpanjwani