-
Notifications
You must be signed in to change notification settings - Fork 105
fix: Wire up Device Storage Method session setting to SDK configuration #947
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
base: 5.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
|
|
||
| use Auth0\SDK\Auth0; | ||
| use Auth0\SDK\Configuration\SdkConfiguration; | ||
| use Auth0\SDK\Store\SessionStore; | ||
| use Auth0\WordPress\Actions\{Authentication as AuthenticationActions, Base as Actions, Configuration as ConfigurationActions, Sync as SyncActions, Tools as ToolsActions, Updates as UpdatesActions}; | ||
| use Auth0\WordPress\Cache\WpObjectCachePool; | ||
| use Auth0\WordPress\Filters\{Authentication as AuthenticationFilters, Base as Filters}; | ||
|
|
@@ -319,6 +320,10 @@ private function importConfiguration(): SdkConfiguration | |
| ); | ||
| } | ||
|
|
||
| if ('sessions' === $this->getOptionString('sessions', 'method')) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have we checked how this behaves on managed WordPress hosts (WP Engine, Kinsta, Pantheon etc.) SessionStore calls |
||
| $sdkConfiguration->setSessionStorage(new SessionStore($sdkConfiguration, $sdkConfiguration->getSessionStorageId())); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SessionStore also doesn't call |
||
| } | ||
|
|
||
| if ('disable' !== $caching) { | ||
| $wpObjectCachePool = new WpObjectCachePool(); | ||
| $sdkConfiguration->setTokenCache($wpObjectCachePool); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
instanceofguard above fixes the fatal, but this line still breaks rolling sessions for both storage methods. This needs the fix from #948 (passing the existing token) to actually work.