Missing methods on PHP SDK storage
Hi,
I'm running into issues with the PHP SDK setting cookies for specific page paths instead of the root path. While trying to understand why that's happening I am attempting to set the cookie path using the setCookiePath() method that is described in the PHP SDK documentation. It doesn't seem to exist for me, do I have the wrong SDK installed somehow, or is the documentation not correct?
code:
$storage = Storage::getInstance()
$storage->setCookiePath('/'); <- returns a method not found
Thanks!
3 Replies
If you are encountering a "method not found" error, it could be due to a few reasons:
SDK Version: Ensure that you have the latest version of the Kinde PHP SDK installed. You can update the SDK using Composer with the following command:
Namespace and Class: Make sure you are correctly using the namespace and class. Your code should look something like this:
Installation Verification: Verify that the SDK is correctly installed and autoloaded. Check your
If you have verified all the above and the issue persists, let me know
Installation Verification: Verify that the SDK is correctly installed and autoloaded. Check your
composer.json
file to ensure it includes the Kinde SDK:
If you have verified all the above and the issue persists, let me know
You're a rock star! My version was out of date!
I tracked the weird path issue down to when the SDK is using the refresh token. I'm hoping that now that I can set that path it will stick to using '/' as the path instead of whatever page triggered the refresh.
Thanks!
Awesome to hear that you were able to solve the issue you were seeing! Feel free to reach out if you need help with anything else.