forrest icon indicating copy to clipboard operation
forrest copied to clipboard

Authentication Error

Open cdavila1990 opened this issue 6 years ago • 12 comments
trafficstars

I have followed all the steps for setup however I am getting this error when I try to reach the authenticate route.

_ErrorException in LaravelSession.php line 15: Argument 2 passed to Omniphx\Forrest\Providers\Laravel\LaravelSession::_construct() must be an instance of Illuminate\Contracts\Session\Session, instance of Illuminate\Session\Store given, called in /var/www/dist.com/vendor/omniphx/forrest/src/Omniphx/Forrest/Providers/Laravel/ForrestServiceProvider.php on line 36 and defined

My research on this error is coming up empty. Please help. Thanks

cdavila1990 avatar Jun 27 '19 20:06 cdavila1990

What version of Laravel are you using?

omniphx avatar Jun 27 '19 21:06 omniphx

5.2 After posting the issue I noticed it has been a problem in the past for others as well. I tried downgrading to version 2.4.2 because someone said it worked for them. Still nothing.

cdavila1990 avatar Jun 27 '19 21:06 cdavila1990

Looks like Laravel updated this interface back in 5.4 and 5.24.

You can try updating your Laravel project to 5.24 or try version 2.3.1 of this library.

omniphx avatar Jun 27 '19 21:06 omniphx

I went down to 2.3.1 and this is the new error. Is there anything I'm missing in the stack trace that you can see?

error

cdavila1990 avatar Jun 28 '19 13:06 cdavila1990

Hm... real hard to deal with these backwards compatibility issues. What is the exact Laravel version you are using?

omniphx avatar Jun 28 '19 14:06 omniphx

Maybe try 2.36?

omniphx avatar Jun 28 '19 14:06 omniphx

My exact laravel version is 5.2.45.

When I remove the session variables from LaravelSession.php I'm able to pass through to salesforce.com for logging in. LaravelSession screenshot

However this is the error I get when I attempt to log in. salesforcelogin error

cdavila1990 avatar Jun 28 '19 15:06 cdavila1990

unsupported_grant_type is actually a Salesforce response, so that's a good sign. Could you share what you have configured?

omniphx avatar Jun 28 '19 19:06 omniphx

Possible it might have to do with the login url you are using: https://salesforce.stackexchange.com/questions/223205/sfdx-grant-type-not-supported

omniphx avatar Jun 28 '19 19:06 omniphx

CALLBACK_URI=https://login.salesforce.com/services/oauth2/token LOGIN_URL=https://login.salesforce.com

I didn't think LOGIN_URL needed to change. I can log in fine to salesforce when I'm not trying to authenticate via my Laravel app.

cdavila1990 avatar Jun 28 '19 19:06 cdavila1990

What would you like to see as far as configuration goes?

cdavila1990 avatar Jun 28 '19 20:06 cdavila1990

Callback URI is what endpoint Salesforce is supposed to send the response. For instance, it will probably be localhost:8080/callback or similar for local development

omniphx avatar Jul 17 '19 15:07 omniphx