Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Suggested fixes for use as a WP plugin #7

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

alyxb
Copy link
Contributor

@alyxb alyxb commented Feb 2, 2021

This is a suggested fix to resolve issue using this package as a WP plugin without Composer.

I believe these are breaking changes to the Composer version, which does install the Auth0 package in the same namespace as the WP Rest API Auth package, therefore this should be treated as a draft PR for consideration to reconcile with Composer and Plugin support (I'm not sure the best way to do both).

I changed this to rely on the class names provided by the "Login by Auth0" WP plugin:

  • WP_Auth0_IdTokenVerifier
  • WP_Auth0_SymmetricVerifier

as in the current version in main, the referenced classes (TokenVerifier, SymmetricVerifier) are missing.

This also includes some troubleshooting tips in the README to help others in general.

@joshcanhelp
Copy link
Owner

@alyxb - Thank you for pointing this out!

In the README, it mentions grabbing the latest ZIP but, as you mentioned, that ZIP does not include the required Composer dependencies. I thought we had that wired up (there is a workflow for it) but I guess not.

For now, running composer install in the plugin directory should work without changes to the files but let me dig a bit and get this working how it should. It should work with both install methods and I'm not sure if the WP token verifier is a direct replacement.

Copy link
Owner

@joshcanhelp joshcanhelp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for this PR! It looks like this will work fine and I can just take the out the dependency for the other class. There is not a great way to use this without the Auth0 WP plugin installed so I think it's fine to rely on that.

@joshcanhelp joshcanhelp merged commit ac792de into joshcanhelp:main Feb 16, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants