abp icon indicating copy to clipboard operation
abp copied to clipboard

Session stays valid after purging & recreating database

Open xorinzor opened this issue 1 year ago • 5 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

I'm creating a fresh project using the layered app template.

Recently I was signed in, made some changes to my migrations file and decided to delete all tables & re-run the DbMigrator to fill the database from a fresh state.

To my suprise after I started the webserver again and went to the page, I was still signed in. Once I tried to create some data I even got an error where the insert failed because the User ID didn't match a foreign key on the users table. Somehow, it still was using the previous GUID of the admin user. After logging out & logging back in this was resolved.

Reproduction Steps

  1. Create a new project
  2. Run migrations
  3. Start webserver
  4. Login on the website
  5. stop webserver
  6. Delete tables from database
  7. Run migrations
  8. Start webserver
  9. Go back to the website, you will still be logged in.

Expected behavior

The session should have been invalidated

Actual behavior

User is still signed in with the old user information

Regression?

No response

Known Workarounds

No response

Version

6.0.1

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Linux

Other information

No response

xorinzor avatar Dec 08 '22 13:12 xorinzor