You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We went from using UserPasswordSoap, to the UserPassword authentication scheme. We have the username, password, and token all set in our environment and have the Forrest configured as:
` /*
* Options include WebServer or UserPassword
*/
'authentication' => 'UserPassword',
/*
* Enter your credentials
* Username and Password are only necessary for UserPassword flow.
* Likewise, callbackURI is only necessary for WebServer flow.
*/
'credentials' => [
//Required:
'consumerKey' => env('CONSUMER_KEY'),
'consumerSecret' => env('CONSUMER_SECRET'),
'callbackURI' => env('CALLBACK_URI'),
'loginURL' => env('LOGIN_URL'),
// Only required for UserPassword authentication:
'username' => env('SF_USERNAME'),
// Security token might need to be ammended to password unless IP Address is whitelisted
'password' => env('SF_PASSWORD').env('SF_TOKEN'),
],`
However when making a query using forrest we get the following error:
development.ERROR: Create Order Failed. {"input":{"sfValueObjectId":"a1r2f0000..."},"error":"[object] (Omniphx\\Forrest\\Exceptions\\MissingTokenException(code: 0): No token available at /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/TokenRepository.php:55) [stacktrace] #0 /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/TokenRepository.php(41): Omniphx\\Forrest\\Repositories\\TokenRepository->verify() #1 /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/InstanceURLRepository.php(50): Omniphx\\Forrest\\Repositories\\TokenRepository->get() #2 /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Client.php(428): Omniphx\\Forrest\\Repositories\\InstanceURLRepository->get() #3 /Users/josh.reeter/projects/5.8/greenfield/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Omniphx\\Forrest\\Client->query('SELECT Valuatio...')
Any ideas why this might be happening? It seems that if a token can't be located then Forrest should reauthenticate?
The text was updated successfully, but these errors were encountered:
Additional Info, it seems the InstanceURLRepository is trying to get the instance URL from the token repo when I call the query.
public function get() { if (isset($this->settings['instanceURL']) && !empty($this->settings['instanceURL'])) { return $this->settings['instanceURL']; } else { return $this->tokenRepo->get()['instance_url']; } }
It doesn't seem to be there, thus MissingTokenException.. Not quite sure how to resolve this since the forret config says instanceUrl is optional and not recommended?
Hello,
We went from using UserPasswordSoap, to the UserPassword authentication scheme. We have the username, password, and token all set in our environment and have the Forrest configured as:
` /*
* Options include WebServer or UserPassword
*/
'authentication' => 'UserPassword',
However when making a query using forrest we get the following error:
development.ERROR: Create Order Failed. {"input":{"sfValueObjectId":"a1r2f0000..."},"error":"[object] (Omniphx\\Forrest\\Exceptions\\MissingTokenException(code: 0): No token available at /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/TokenRepository.php:55) [stacktrace] #0 /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/TokenRepository.php(41): Omniphx\\Forrest\\Repositories\\TokenRepository->verify() #1 /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Repositories/InstanceURLRepository.php(50): Omniphx\\Forrest\\Repositories\\TokenRepository->get() #2 /Users/josh.reeter/projects/5.8/greenfield/vendor/omniphx/forrest/src/Omniphx/Forrest/Client.php(428): Omniphx\\Forrest\\Repositories\\InstanceURLRepository->get() #3 /Users/josh.reeter/projects/5.8/greenfield/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(237): Omniphx\\Forrest\\Client->query('SELECT Valuatio...')
Any ideas why this might be happening? It seems that if a token can't be located then Forrest should reauthenticate?
The text was updated successfully, but these errors were encountered: