Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session store not set on request #259

Open
guypeled1 opened this issue Jul 16, 2020 · 4 comments
Open

Session store not set on request #259

guypeled1 opened this issue Jul 16, 2020 · 4 comments

Comments

@guypeled1
Copy link

I am getting this error when trying to authenticate.
What should i do?

@RipleWare
Copy link

I am getting this error too after trying to use this library for the first time. I have invested a lot of time trying to get this working on a skeleton Laravel installation and I still can't get this to work.

I have tried changing the storage type, authentication method and also wrapped my authentication route in the web middleware but I still get can't get authentication to happen.

If I use the middleware, I get the following error:
ErrorException: Undefined index: instance_url in file /home/vagrant/Code/ehl/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/InstanceURLRepository.php on line 50

If I don't use middleware, I get:
RuntimeException: Session store not set on request. in file /home/vagrant/Code/ehl/vendor/laravel/framework/src/Illuminate/Http/Request.php on line 483

Can anyone shed any light on this. I really want to get this library working.

@mokchend
Copy link

mokchend commented Nov 1, 2020

I was struggling with this error when try to use from Laravel command line.
Please check: https://stackoverflow.com/questions/28866821/call-laravel-controller-via-command-line for a seamless solution.

@Mushood
Copy link

Mushood commented Dec 20, 2021

If you are running this in a command, change you storage.type config in config/forrest.php from session to cache

    'storage'        => [
        'type'          => 'cache', // Options include: 'session', 'cache', 'object'
        'path'          => 'forrest_', // unique storage path to avoid collisions
        'expire_in'     => 60, // number of minutes to expire cache/session
        'store_forever' => false, // never expire cache/session
    ],

@shsaqib99
Copy link

@Mushood

What if i don't want the Authentication to be expired untill the user revoke it himself.
should i give no value in expire_in and make store_forever : true ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants