Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Add setting for cookie name prefix to plugin settings #892

Open
Labels
@jaketfoster

Description

@jaketfoster

Checklist

  • I have looked into theReadme and thedocumentation, and have not found a suitable solution or answer.
  • I have searched theissues and have not found a suitable solution or answer.
  • I have searched theAuth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within theAuth0 Code of Conduct.

Describe the problem you'd like to have solved

v5 appears to have removed the hooks mentioned in thisissue. I am using pantheon, and need to prefix the cookie names withSTYXKEY_ to avoid cookies being lost due to the CDN.

Describe the ideal solution

The ideal solution would be to add an optional field to the plugin's settings in the WordPress admin dashboard to set the SDK configuration object's storage IDs with the prefix. This would save custom work needing to be done to achieve this with the plugin.

Alternatives and current workarounds

I achieved a workaround by adding aplugins_loaded action in functions.php of my site as follows:

// change the auth0 cookie name to be prefixed with STYXKEY_ for Pantheonfunctionupdate_auth0_cookie_storage_id(){$auth0SDK =wpAuth0()->getSdk();$auth0Config =$auth0SDK->configuration();$storageId ='STYXKEY_' .$auth0Config->getSessionStorageId();$transientId ='STYXKEY_' .$auth0Config->getTransientStorageId();$auth0Config->setSessionStorageId($storageId);$auth0Config->setTransientStorageId($transientId);$auth0Config->setSessionStorage(newCookieStore($auth0Config,$auth0Config->getSessionStorageId()));$auth0Config->setTransientStorage(newCookieStore($auth0Config,$auth0Config->getTransientStorageId()));$auth0SDK->setConfiguration($auth0Config);}add_action('plugins_loaded',update_auth0_cookie_storage_id());

I was able to update the configuration of the SDK by using this method. However, it took me a while of reading the source code of the plugin and SDK to find this solution, so I am proposing adding a setting in the Plugin settings on the WordPress admin dashboard.

Additional context

Pantheon Cache Docs for referencehere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp