The most logical solution would be to immediately transfer the entire application to Laravel. However, if this is not possible, it should be possible. If you conduct sessions in Redis, they will of course be available for both applications. Main problems:
- You want the User object in the Laravel application to be authenticated, but authentication takes place in the Cake application. Therefore, you may need to reauthorize the Laravel application. However, if you know that the session is valid and you have a user ID, you can do it without problems.
- A session token is generated in different ways: Laravel will generate its token through one algorithm using its application key. Without knowledge of CakePHP, I am sure that the session key is generated in different ways. You may be able to overcome this by modifying key generation to match them. Otherwise, you will encounter problems for hashing salts, checking CSRF, and something else that happens between applications.
Phroggyy
source share