├── .editorconfig
├── .github
├── CODEOWNERS
├── ISSUE_TEMPLATE
│ ├── Bug Report.yml
│ ├── Feature Request.yml
│ └── config.yml
├── dependabot.yml
├── stale.yml
└── workflows
│ └── semgrep.yml
├── .gitignore
├── .php-cs-fixer.dist.php
├── .phpcs.xml.dist
├── .shiprc
├── .version
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── build.sh
├── composer.json
├── opslevel.yml
├── phpstan.neon.dist
├── phpunit.xml.dist
├── psalm.xml.dist
├── public-signing-key.pub
├── rector.php
├── scoper.inc.php
├── src
├── Actions
│ ├── Authentication.php
│ ├── Base.php
│ ├── Configuration.php
│ ├── Sync.php
│ ├── Tools.php
│ └── Updates.php
├── Cache
│ ├── WpObjectCacheItem.php
│ └── WpObjectCachePool.php
├── Database.php
├── Filters
│ ├── Authentication.php
│ └── Base.php
├── Hooks.php
├── Http
│ ├── Client.php
│ ├── Factory.php
│ ├── Message
│ │ ├── MessageTrait.php
│ │ ├── Request.php
│ │ ├── RequestTrait.php
│ │ ├── Response.php
│ │ ├── ServerRequest.php
│ │ ├── Stream.php
│ │ ├── UploadedFile.php
│ │ └── Uri.php
│ └── MessageFactory
│ │ ├── RequestFactory.php
│ │ ├── ResponseFactory.php
│ │ └── StreamFactory.php
├── Plugin.php
└── Utilities
│ ├── Render.php
│ └── Sanitize.php
├── updates.json
└── wpAuth0.php
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
17 | [docker-compose.yml]
18 | indent_size = 4
19 |
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @auth0/project-dx-sdks-engineer-codeowner
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Bug Report.yml:
--------------------------------------------------------------------------------
1 | name: 🐞 Report a bug
2 | description: Have you found a bug or issue? Create a bug report for this library
3 | labels: ["bug"]
4 |
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | **Please do not report security vulnerabilities here**. The [Responsible Disclosure Program](https://auth0.com/responsible-disclosure-policy) details the procedure for disclosing security issues.
10 |
11 | - type: checkboxes
12 | id: checklist
13 | attributes:
14 | label: Checklist
15 | options:
16 | - label: I have looked into the [Readme](https://github.com/auth0/wordpress#readme) and the [documentation](https://auth0.com/docs/customize/integrations/cms/wordpress-plugin), and have not found a suitable solution or answer.
17 | required: true
18 | - label: I have searched the [issues](https://github.com/auth0/wordpress/issues) and have not found a suitable solution or answer.
19 | required: true
20 | - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer.
21 | required: true
22 | - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
23 | required: true
24 |
25 | - type: textarea
26 | id: description
27 | attributes:
28 | label: Description
29 | description: Provide a clear and concise description of the issue, including what you expected to happen.
30 | validations:
31 | required: true
32 |
33 | - type: textarea
34 | id: reproduction
35 | attributes:
36 | label: Reproduction
37 | description: Detail the steps taken to reproduce this error, and whether this issue can be reproduced consistently or if it is intermittent.
38 | placeholder: |
39 | 1. Step 1...
40 | 2. Step 2...
41 | 3. ...
42 | validations:
43 | required: true
44 |
45 | - type: textarea
46 | id: additional-context
47 | attributes:
48 | label: Additional context
49 | description: Other libraries that might be involved, or any other relevant information you think would be useful.
50 | validations:
51 | required: false
52 |
53 | - type: input
54 | id: environment-version
55 | attributes:
56 | label: wp-auth0 version
57 | validations:
58 | required: true
59 |
60 | - type: input
61 | id: environment-wordpress-version
62 | attributes:
63 | label: WordPress version
64 | validations:
65 | required: true
66 |
67 | - type: input
68 | id: environment-php-version
69 | attributes:
70 | label: PHP version
71 | validations:
72 | required: true
73 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/Feature Request.yml:
--------------------------------------------------------------------------------
1 | name: 🧩 Feature request
2 | description: Suggest an idea or a feature for this library
3 | labels: ["feature request"]
4 |
5 | body:
6 | - type: checkboxes
7 | id: checklist
8 | attributes:
9 | label: Checklist
10 | options:
11 | - label: I have looked into the [Readme](https://github.com/auth0/wordpress#readme) and the [documentation](https://auth0.com/docs/customize/integrations/cms/wordpress-plugin), and have not found a suitable solution or answer.
12 | required: true
13 | - label: I have searched the [issues](https://github.com/auth0/wordpress/issues) and have not found a suitable solution or answer.
14 | required: true
15 | - label: I have searched the [Auth0 Community](https://community.auth0.com) forums and have not found a suitable solution or answer.
16 | required: true
17 | - label: I agree to the terms within the [Auth0 Code of Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md).
18 | required: true
19 |
20 | - type: textarea
21 | id: description
22 | attributes:
23 | label: Describe the problem you'd like to have solved
24 | description: A clear and concise description of what the problem is.
25 | placeholder: I'm always frustrated when...
26 | validations:
27 | required: true
28 |
29 | - type: textarea
30 | id: ideal-solution
31 | attributes:
32 | label: Describe the ideal solution
33 | description: A clear and concise description of what you want to happen.
34 | validations:
35 | required: true
36 |
37 | - type: textarea
38 | id: alternatives-and-workarounds
39 | attributes:
40 | label: Alternatives and current workarounds
41 | description: A clear and concise description of any alternatives you've considered or any workarounds that are currently in place.
42 | validations:
43 | required: false
44 |
45 | - type: textarea
46 | id: additional-context
47 | attributes:
48 | label: Additional context
49 | description: Add any other context or screenshots about the feature request here.
50 | validations:
51 | required: false
52 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: false
2 | contact_links:
3 | - name: Auth0 Community
4 | url: https://community.auth0.com
5 | about: Discuss this SDK in the Auth0 Community forums
6 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: 'github-actions'
4 | directory: '/'
5 | schedule:
6 | interval: 'daily'
7 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Configuration for probot-stale - https://github.com/probot/stale
2 |
3 | # Number of days of inactivity before an Issue or Pull Request becomes stale
4 | daysUntilStale: 90
5 |
6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7 | daysUntilClose: 7
8 |
9 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
10 | exemptLabels: []
11 |
12 | # Set to true to ignore issues with an assignee (defaults to false)
13 | exemptAssignees: true
14 |
15 | # Label to use when marking as stale
16 | staleLabel: closed:stale
17 |
18 | # Comment to post when marking as stale. Set to `false` to disable
19 | markComment: >
20 | This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you have not received a response for our team (apologies for the delay) and this is still a blocker, please reply with additional information or just a ping. Thank you for your contribution! 🙇♂️
--------------------------------------------------------------------------------
/.github/workflows/semgrep.yml:
--------------------------------------------------------------------------------
1 | name: Semgrep
2 |
3 | on:
4 | merge_group:
5 | pull_request:
6 | types:
7 | - opened
8 | - synchronize
9 | push:
10 | branches:
11 | - 5.x
12 | schedule:
13 | - cron: "30 0 1,15 * *"
14 |
15 | permissions:
16 | contents: read
17 |
18 | concurrency:
19 | group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20 | cancel-in-progress: ${{ github.ref != 'refs/heads/5.x' }}
21 |
22 | jobs:
23 | check:
24 | name: Check for Vulnerabilities
25 | runs-on: ubuntu-latest
26 |
27 | container:
28 | image: returntocorp/semgrep
29 |
30 | steps:
31 | - if: github.actor == 'dependabot[bot]' || github.event_name == 'merge_group'
32 | run: exit 0 # Skip unnecessary test runs for dependabot and merge queues. Artifically flag as successful, as this is a required check for branch protection.
33 |
34 | - uses: actions/checkout@v4
35 | with:
36 | ref: ${{ github.event.pull_request.head.sha || github.ref }}
37 |
38 | - run: semgrep ci
39 | env:
40 | SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
41 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | build
3 | composer.phar
4 | composer.lock
5 | phpunit.xml
6 | vendor
7 | .idea
8 | .env
9 | .phpcs.xml
10 | phpcs.xml
11 | .phpunit.result.cache
12 | .DS_Store
13 | coverage
14 | TODO.txt
15 | composer.local.json
16 | .php-cs-fixer.cache
17 | composer.local.old
18 | pest.log
19 | private-signing-key.pem
20 | build.zip
21 | build.zip.sig
22 |
--------------------------------------------------------------------------------
/.php-cs-fixer.dist.php:
--------------------------------------------------------------------------------
1 | setRiskyAllowed(true)
7 | ->setRules([
8 | 'array_indentation' => true,
9 | 'array_push' => true,
10 | 'array_syntax' => ['syntax' => 'short'],
11 | 'assign_null_coalescing_to_coalesce_equal' => true,
12 | 'backtick_to_shell_exec' => true,
13 | 'binary_operator_spaces' => true,
14 | 'blank_line_after_namespace' => true,
15 | 'blank_line_after_opening_tag' => true,
16 | 'blank_line_before_statement' => true,
17 | 'blank_line_between_import_groups' => true,
18 | 'braces' => true,
19 | 'cast_spaces' => true,
20 | 'class_attributes_separation' => ['elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one', 'trait_import' => 'one', 'case' => 'one']],
21 | 'class_definition' => ['multi_line_extends_each_single_line' => true, 'single_line' => true, 'single_item_single_line' => true, 'space_before_parenthesis' => false, 'inline_constructor_arguments' => false],
22 | 'class_reference_name_casing' => true,
23 | 'clean_namespace' => true,
24 | 'combine_consecutive_issets' => true,
25 | 'combine_consecutive_unsets' => true,
26 | 'combine_nested_dirname' => true,
27 | 'comment_to_phpdoc' => ['ignored_tags' => ['codeCoverageIgnoreStart', 'codeCoverageIgnoreEnd', 'phpstan-ignore-next-line']],
28 | 'compact_nullable_typehint' => true,
29 | 'concat_space' => ['spacing' => 'one'],
30 | 'constant_case' => ['case' => 'lower'],
31 | 'curly_braces_position' => ['control_structures_opening_brace' => 'same_line', 'functions_opening_brace' => 'next_line_unless_newline_at_signature_end', 'anonymous_functions_opening_brace' => 'same_line', 'classes_opening_brace' => 'next_line_unless_newline_at_signature_end', 'anonymous_classes_opening_brace' => 'same_line', 'allow_single_line_empty_anonymous_classes' => true, 'allow_single_line_anonymous_functions' => true],
32 | 'date_time_create_from_format_call' => true,
33 | 'date_time_immutable' => true,
34 | 'declare_equal_normalize' => ['space' => 'none'],
35 | 'declare_parentheses' => true,
36 | 'declare_strict_types' => true,
37 | 'dir_constant' => true,
38 | 'doctrine_annotation_array_assignment' => true,
39 | 'doctrine_annotation_braces' => true,
40 | 'doctrine_annotation_indentation' => true,
41 | 'doctrine_annotation_spaces' => true,
42 | 'echo_tag_syntax' => ['format' => 'long'],
43 | 'elseif' => true,
44 | 'empty_loop_body' => true,
45 | 'empty_loop_condition' => true,
46 | 'encoding' => true,
47 | 'ereg_to_preg' => true,
48 | 'error_suppression' => true,
49 | 'escape_implicit_backslashes' => true,
50 | 'explicit_indirect_variable' => true,
51 | 'explicit_string_variable' => true,
52 | 'final_class' => true,
53 | 'final_internal_class' => true,
54 | 'final_public_method_for_abstract_class' => true,
55 | 'fopen_flag_order' => true,
56 | 'fopen_flags' => true,
57 | 'full_opening_tag' => true,
58 | 'fully_qualified_strict_types' => true,
59 | 'function_declaration' => true,
60 | 'function_to_constant' => true,
61 | 'function_typehint_space' => true,
62 | 'general_phpdoc_annotation_remove' => true,
63 | 'general_phpdoc_tag_rename' => true,
64 | 'get_class_to_class_keyword' => true,
65 | 'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
66 | 'group_import' => true,
67 | 'heredoc_indentation' => true,
68 | 'heredoc_to_nowdoc' => true,
69 | 'implode_call' => true,
70 | 'include' => true,
71 | 'increment_style' => ['style' => 'pre'],
72 | 'indentation_type' => true,
73 | 'integer_literal_case' => true,
74 | 'is_null' => true,
75 | 'lambda_not_used_import' => true,
76 | 'line_ending' => true,
77 | 'linebreak_after_opening_tag' => true,
78 | 'list_syntax' => ['syntax' => 'short'],
79 | 'logical_operators' => true,
80 | 'lowercase_cast' => true,
81 | 'lowercase_keywords' => true,
82 | 'lowercase_static_reference' => true,
83 | 'magic_constant_casing' => true,
84 | 'magic_method_casing' => true,
85 | 'mb_str_functions' => false,
86 | 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline', 'after_heredoc' => true],
87 | 'method_chaining_indentation' => true,
88 | 'modernize_strpos' => true,
89 | 'modernize_types_casting' => true,
90 | 'multiline_comment_opening_closing' => true,
91 | 'multiline_whitespace_before_semicolons' => true,
92 | 'native_function_casing' => true,
93 | 'native_function_invocation' => true,
94 | 'native_function_type_declaration_casing' => true,
95 | 'new_with_braces' => true,
96 | 'no_alias_functions' => true,
97 | 'no_alias_language_construct_call' => true,
98 | 'no_alternative_syntax' => true,
99 | 'no_binary_string' => true,
100 | 'no_blank_lines_after_class_opening' => true,
101 | 'no_blank_lines_after_phpdoc' => true,
102 | 'no_break_comment' => true,
103 | 'no_closing_tag' => true,
104 | 'no_empty_comment' => true,
105 | 'no_empty_phpdoc' => true,
106 | 'no_empty_statement' => true,
107 | 'no_extra_blank_lines' => true,
108 | 'no_homoglyph_names' => true,
109 | 'no_leading_import_slash' => true,
110 | 'no_leading_namespace_whitespace' => true,
111 | 'no_mixed_echo_print' => true,
112 | 'no_multiline_whitespace_around_double_arrow' => true,
113 | 'no_multiple_statements_per_line' => true,
114 | 'no_php4_constructor' => true,
115 | 'no_short_bool_cast' => true,
116 | 'no_singleline_whitespace_before_semicolons' => true,
117 | 'no_space_around_double_colon' => true,
118 | 'no_spaces_after_function_name' => true,
119 | 'no_spaces_around_offset' => true,
120 | 'no_spaces_inside_parenthesis' => true,
121 | 'no_superfluous_elseif' => true,
122 | 'no_trailing_comma_in_singleline' => true,
123 | 'no_trailing_whitespace_in_comment' => true,
124 | 'no_trailing_whitespace_in_string' => true,
125 | 'no_trailing_whitespace' => true,
126 | 'no_unneeded_control_parentheses' => true,
127 | 'no_unneeded_curly_braces' => true,
128 | 'no_unneeded_final_method' => true,
129 | 'no_unneeded_import_alias' => true,
130 | 'no_unreachable_default_argument_value' => true,
131 | 'no_unset_cast' => true,
132 | 'no_unused_imports' => true,
133 | 'no_useless_concat_operator' => true,
134 | 'no_useless_else' => true,
135 | 'no_useless_nullsafe_operator' => true,
136 | 'no_useless_return' => true,
137 | 'no_useless_sprintf' => true,
138 | 'no_whitespace_before_comma_in_array' => true,
139 | 'no_whitespace_in_blank_line' => true,
140 | 'non_printable_character' => true,
141 | 'normalize_index_brace' => true,
142 | 'not_operator_with_successor_space' => true,
143 | 'nullable_type_declaration_for_default_null_value' => true,
144 | 'object_operator_without_whitespace' => true,
145 | 'octal_notation' => true,
146 | 'operator_linebreak' => true,
147 | 'ordered_class_elements' => ['sort_algorithm' => 'alpha', 'order' => ['use_trait', 'case', 'constant', 'constant_private', 'constant_protected', 'constant_public', 'property_private', 'property_private_readonly', 'property_private_static', 'property_protected', 'property_protected_readonly', 'property_protected_static', 'property_public', 'property_public_readonly', 'property_public_static', 'property_static', 'protected', 'construct', 'destruct', 'magic', 'method', 'public', 'method_public', 'method_abstract', 'method_public_abstract', 'method_public_abstract_static', 'method_public_static', 'method_static', 'method_private', 'method_private_abstract', 'method_private_abstract_static', 'method_private_static', 'method_protected', 'method_protected_abstract', 'method_protected_abstract_static', 'method_protected_static', 'phpunit', 'private', 'property']],
148 | 'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['const', 'class', 'function']],
149 | 'ordered_interfaces' => true,
150 | 'ordered_traits' => true,
151 | 'php_unit_fqcn_annotation' => true,
152 | 'phpdoc_add_missing_param_annotation' => ['only_untyped' => false],
153 | 'phpdoc_align' => ['align' => 'vertical'],
154 | 'phpdoc_indent' => true,
155 | 'phpdoc_inline_tag_normalizer' => true,
156 | 'phpdoc_line_span' => true,
157 | 'phpdoc_no_access' => true,
158 | 'phpdoc_no_empty_return' => true,
159 | 'phpdoc_no_package' => true,
160 | 'phpdoc_no_useless_inheritdoc' => true,
161 | 'phpdoc_order_by_value' => true,
162 | 'phpdoc_order' => true,
163 | 'phpdoc_return_self_reference' => ['replacements' => ['this' => 'self']],
164 | 'phpdoc_scalar' => true,
165 | 'phpdoc_separation' => true,
166 | 'phpdoc_single_line_var_spacing' => true,
167 | 'phpdoc_summary' => true,
168 | 'phpdoc_tag_type' => true,
169 | 'phpdoc_to_comment' => ['ignored_tags' => ['var']],
170 | 'phpdoc_trim_consecutive_blank_line_separation' => true,
171 | 'phpdoc_trim' => true,
172 | 'phpdoc_types_order' => true,
173 | 'phpdoc_types' => true,
174 | 'phpdoc_var_annotation_correct_order' => true,
175 | 'phpdoc_var_without_name' => true,
176 | 'pow_to_exponentiation' => true,
177 | 'protected_to_private' => true,
178 | 'psr_autoloading' => true,
179 | 'random_api_migration' => true,
180 | 'regular_callable_call' => true,
181 | 'return_assignment' => true,
182 | 'return_type_declaration' => ['space_before' => 'none'],
183 | 'return_type_declaration' => true,
184 | 'self_accessor' => true,
185 | 'self_static_accessor' => true,
186 | 'semicolon_after_instruction' => true,
187 | 'set_type_to_cast' => true,
188 | 'short_scalar_cast' => true,
189 | 'simple_to_complex_string_variable' => true,
190 | 'simplified_if_return' => true,
191 | 'single_blank_line_at_eof' => true,
192 | 'single_blank_line_before_namespace' => true,
193 | 'single_class_element_per_statement' => true,
194 | 'single_line_after_imports' => true,
195 | 'single_line_comment_spacing' => true,
196 | 'single_line_comment_style' => ['comment_types' => ['hash']],
197 | 'single_line_throw' => true,
198 | 'single_quote' => true,
199 | 'single_space_after_construct' => true,
200 | 'single_space_around_construct' => true,
201 | 'single_trait_insert_per_statement' => true,
202 | 'space_after_semicolon' => true,
203 | 'standardize_increment' => true,
204 | 'standardize_not_equals' => true,
205 | 'statement_indentation' => true,
206 | 'static_lambda' => true,
207 | 'strict_comparison' => true,
208 | 'strict_param' => true,
209 | 'string_length_to_empty' => true,
210 | 'string_line_ending' => true,
211 | 'switch_case_semicolon_to_colon' => true,
212 | 'switch_case_space' => true,
213 | 'switch_continue_to_break' => true,
214 | 'ternary_operator_spaces' => true,
215 | 'ternary_to_elvis_operator' => true,
216 | 'ternary_to_null_coalescing' => true,
217 | 'trailing_comma_in_multiline' => ['after_heredoc' => true, 'elements' => ['arguments', 'arrays', 'match', 'parameters']],
218 | 'trim_array_spaces' => true,
219 | 'types_spaces' => ['space' => 'single', 'space_multiple_catch' => 'single'],
220 | 'unary_operator_spaces' => true,
221 | 'use_arrow_functions' => true,
222 | 'visibility_required' => true,
223 | 'void_return' => true,
224 | 'whitespace_after_comma_in_array' => true,
225 | 'yoda_style' => true,
226 | ])
227 | ->setFinder(
228 | PhpCsFixer\Finder::create()
229 | ->exclude('vendor')
230 | ->in([__DIR__ . '/src/']),
231 | );
232 |
--------------------------------------------------------------------------------
/.phpcs.xml.dist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.shiprc:
--------------------------------------------------------------------------------
1 | {
2 | "files": {
3 | "wpAuth0.php": [],
4 | ".version": []
5 | },
6 | "prefixVersion": false
7 | }
8 |
--------------------------------------------------------------------------------
/.version:
--------------------------------------------------------------------------------
1 | 5.2.1
2 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | ## [5.3.0](https://github.com/auth0/wp-auth0/tree/5.3.0) (2025-05-16)
4 |
5 | ### Fixed
6 |
7 | - Security fix: Resolve CVE-2025-47275
8 |
9 | ## [5.2.1](https://github.com/auth0/wp-auth0/tree/5.2.1) (2024-06-03)
10 |
11 | ### Fixed
12 |
13 | - Resolves an issue in which the fallback URI secret isn't shown. [\#903](https://github.com/auth0/wordpress/pull/903) ([HPiirainen](https://github.com/HPiirainen))
14 | - Resolves a compatibility issue with changes in WordPress 6.5 causing invalidated sessions. ([evansims](https://github.com/evansims))
15 |
16 | ## [5.2.0](https://github.com/auth0/wp-auth0/tree/5.2.0) (2023-12-11)
17 |
18 | ### Added
19 |
20 | - feat(SDK-4734): Implement support for Back-Channel Logout [\#882](https://github.com/auth0/wordpress/pull/882) ([evansims](https://github.com/evansims))
21 |
22 | > **Note**
23 | > ¹ To use this feature, an Auth0 tenant must have support for it enabled.
24 |
25 | ## [5.1.0](https://github.com/auth0/wp-auth0/tree/5.1.0) (2023-07-24)
26 |
27 | ### Added
28 |
29 | - Organization Name support was added for Authentication API and token handling ¹
30 |
31 | ### Updated
32 |
33 | - Bumped tested WordPress version to forthcoming 6.3.0 release.
34 | - Bumped `auth0-php` dependency version range to `^8.7`.
35 | - Updated telemetry to indicate `wordpress` package (previously `wp-auth0`.)
36 |
37 | > **Note**
38 | > ¹ To use this feature, an Auth0 tenant must have support for it enabled. This feature is not yet available to all tenants.
39 |
40 | ## [5.0.1](https://github.com/auth0/wp-auth0/tree/5.0.1) (2022-12-12)
41 |
42 | ### Fixed
43 |
44 | - Resolves an issue that sometimes prevented the plugin from being activated on WordPress 6
45 |
46 | ## [5.0.0](https://github.com/auth0/wp-auth0/tree/5.0.0) (2022-10-28)
47 |
48 | Introducing V5 of WP-Auth0 ("Login by Auth0"), a major redesign and upgrade to our WordPress integration plugin. V5 includes many new features and changes:
49 |
50 | - [WordPress 6](https://wordpress.org/support/wordpress-version/version-6-0/) and [PHP 8](https://www.php.net/releases/8.0/en.php) support
51 | - Integration with the [Auth0-PHP SDK](https://github.com/auth0/auth0-php), and access to its entire API (including Management API calls)
52 | High-performance background sync using [WordPress' Cron](https://developer.wordpress.org/plugins/cron/) feature
53 | - "Flexible identifier" support, allowing users to sign in using multiple connection types without requiring extra configuration
54 | - Expanded control over how sign-ins without matching existing WordPress accounts are handled
55 | - Enhanced session pairing between WordPress and Auth0, including session invalidation, access token refresh, and more.
56 |
57 | V5 represents a major step forward for our WordPress plugin, and we're excited to see what you build with it!
58 |
59 | It's important to note, if you wrote custom theme code or plugins for your WordPress site that targeted previous versions of the plugin, you may need to adjust those themes or plugins to adapt to the new version.
60 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2023 Auth0, Inc. (https://auth0.com)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | WordPress Plugin for [Auth0](https://auth0.com) Authentication
4 |
5 | [](https://doge.mit-license.org/)
6 |
7 | :rocket: [Getting Started](#getting-started) - :computer: [SDK Usage](#sdk-usage) - 📆 [Support Policy](#support-policy) - :speech_balloon: [Feedback](#feedback)
8 |
9 | ## Overview
10 |
11 | The Auth0 WordPress plugin replaces the standard WordPress login flow with a new authentication process using Auth0's Universal Login experience. This enables you to secure your WordPress site with Auth0's advanced features, such as MFA, SSO, Passwordless, PassKey, and so on.
12 |
13 | > [!IMPORTANT]
14 | > This plugin is **NOT** a SDK (Software Development Kit.) It's APIs are internal and not intended for developers to extend directly. We do not support altering the plugin's behavior or integrating it in any way beyond what is outlined in this README. If you're looking to build a more extensive integration, please create a solution using the [Auth0-PHP SDK](https://github.com/auth0/auth0-php) instead.
15 |
16 | > [!WARNING]
17 | > v4 of the plugin is no longer supported as of June 2023. We are no longer providing new features or bugfixes for that release. Please upgrade to v5 as soon as possible.
18 |
19 | ## Getting Started
20 |
21 | ### Requirements
22 |
23 | - PHP 8.1+
24 | - [Most recent version of WordPress](https://wordpress.org/news/category/releases/)
25 | - Database credentials with table creation permissions
26 |
27 | > Please review our [support policy](#support-policy) on specific PHP and WordPress versions and when they may exit support in the future.
28 |
29 | ### Installation
30 |
31 |
54 |
55 | #### Composer
56 |
57 | The plugin supports installation through [Composer](https://getcomposer.org/), and is [WPackagist](https://wpackagist.org/) compatible. This approach is preferred when using [Bedrock](https://roots.io/bedrock/), but will work with virtually any WordPress installation.
58 |
59 | For [Bedrock](https://roots.io/bedrock/) installations, you'll usually run this command from the root WordPress installation directory, but check the documentation the project's maintainers provide for the best guidance.
60 |
61 | For standard WordPress installations, this command can be run from the `wp-content/plugins` sub-directory.
62 |
63 | ```
64 | composer require symfony/http-client nyholm/psr7 auth0/wordpress:^5.0
65 | ```
66 |
67 |
68 | Note on Composer Dependencies
69 |
70 | When installed with Composer, the plugin depends on the presence of [PSR-18](https://packagist.org/providers/psr/http-client-implementation) and [PSR-17](https://packagist.org/providers/psr/http-factory-implementation) library implementations. The `require` command above includes two such libraries (`symfony/http-client` and `nyholm/psr7`) that satisfy these requirements, but you can use any other compatible libraries that you prefer. Visit Packagist for a list of [PSR-18](https://packagist.org/providers/psr/http-client-implementation) and [PSR-17](https://packagist.org/providers/psr/http-factory-implementation) providers.
71 |
72 | If you are using Bedrock or another Composer-based configuration, you can try installing `auth0/wordpress` without any other dependencies, as the implementations may be satisfied by other already installed packages.
73 |
74 | > **Note** PHP Standards Recommendations (PSRs) are standards for PHP libraries and applications that enable greater interoperability and choice. You can learn more about them and the PHP-FIG organization that maintains them [here](https://www.php-fig.org/).
75 |
76 |
77 |
78 |
90 |
91 | ### Activation
92 |
93 | After installation, you must activate the plugin within your WordPress site:
94 |
95 | 1. Open your WordPress Dashboard.
96 | 2. Select 'Plugins' from the sidebar, and then 'Installed Plugins.'
97 | 3. Choose 'Activate' underneath the plugin's name.
98 |
99 | ### Configure Auth0
100 |
101 | 1. Sign into Auth0. If you don't have an account, [it's free to create one](https://auth0.com/signup).
102 | 2. [Open 'Applications' from your Auth0 Dashboard](https://manage.auth0.com/#/applications/create), and select 'Create Application.'
103 | 3. Choose 'Regular Web Application' and then 'Create.'
104 | 4. From the newly created application's page, select the Settings tab.
105 |
106 | Please prepare the following information:
107 |
108 | - Note the **Domain**, **Client ID**, and **Client Secret**, available from the newly created Application's Settings page. You will need these to configure the plugin in the next step.
109 | - From your WordPress Dashboard's General Settings page, note your **WordPress Address** and **Site Address** URLs. We recommend you read our guidance on [common WordPress URL issues](#common-wordpress-url-issues).
110 |
111 | Continue configuring your Auth0 application from its Settings page:
112 |
113 | - **Allowed Callback URLs** should include the URL to your WordPress site's `wp-login.php`.
114 | - In most (but not all) cases, this will be your WordPress Address with `/wp-login.php` appended.
115 | - Please ensure your site is configured never to cache this URL, or you may see an "invalid state" error during login.
116 | - **Allowed Web Origins** should include both your WordPress Address and Site Address URLs.
117 | - **Allowed Logout URLs** should consist of your WordPress Address.
118 |
119 |
120 | Common WordPress URL Issues
121 |
122 | - These must be the URLs your visitors will use to access your WordPress site. If you are using a reverse proxy, you may need to manually configure your WordPress Address and Site Address URLs to match the URL you use to access your site.
123 | - Make sure these URLs match your site's configured protocol. When using a reverse proxy, you may need to update these to reflect serving over SSL/HTTPS.
124 |
125 |
126 |
127 | Troubleshooting
128 |
129 | If you're encountering issues, start by checking that your Auth0 Application is setup like so:
130 |
131 | - **Application Type** must be set to **Regular Web Application**.
132 | - **Token Endpoint Authentication Method** must be set to **Post**.
133 | - **Allowed Origins (CORS)** should be blank.
134 |
135 | Scroll down and expand the "Advanced Settings" panel, then:
136 |
137 | - Under **OAuth**:
138 | - Ensure that **JsonWebToken Signature Algorithm** is set to **RS256**.
139 | - Check that **OIDC Conformant** is enabled.
140 | - Under **Grant Types**:
141 | - Ensure that **Implicit**, **Authorization Code**, and **Client Credentials** are enabled.
142 | - You may also want to enable **Refresh Token**.
143 |
144 |
145 |
146 | ### Configure the Plugin
147 |
148 | Upon activating the Auth0 plugin, you will find a new "Auth0" section in the sidebar of your WordPress Dashboard. This section enables you to configure the plugin in a variety of ways.
149 |
150 | For the plugin to operate, at a minimum, you will need to configure the Domain, Client ID, and Client Secret fields. These are available from the Auth0 Application you created in the previous step. Once configured, select the "Enable Authentication" option to have the plugin begin handling authentication for you.
151 |
152 | We recommend testing on a staging/development site using a separate Auth0 Application before putting the plugin live on your production site.
153 |
154 | ### Configure WordPress
155 |
156 | #### Plugin Database Tables
157 |
158 | The plugin uses dedicated database tables to guarantee high performance. When the plugin is activated, it will use the database credentials you have configured for WordPress to create these tables.
159 |
160 | Please ensure your configured credentials have appropriate privileges to create new tables.
161 |
162 | #### Cron Configuration
163 |
164 | The plugin uses WordPress' [background task manager](https://developer.wordpress.org/plugins/cron/) to perform important periodic tasks. Proper synchronization between WordPress and Auth0 relies on this.
165 |
166 | By default, WordPress' task manager runs on every page load, which is inadvisable for production sites. For best performance and reliability, please ensure you have configured WordPress to use a [cron job](https://developer.wordpress.org/plugins/cron/hooking-wp-cron-into-the-system-task-scheduler/) to run these tasks periodically instead.
167 |
168 | ## SDK Usage
169 |
170 | The plugin is built on top of [Auth0-PHP](https://github.com/auth0/auth0-PHP) — Auth0's full-featured PHP SDK for Authentication and Management APIs.
171 |
172 | For custom WordPress development, please do not extend the plugin's classes themselves, as this is not supported. Nearly all of the plugin's APIs are considered `internal` and will change over time, most likely breaking any custom extension built upon them.
173 |
174 | Instead, please take advantage of the full PHP SDK that the plugin is built upon. You can use the plugin's `getSdk()` method to retrieve a configured instance of the SDK, ready for use. This method can be called from the plugin's global `wpAuth0()` helper, which returns the WordPress plugin itself.
175 |
176 | ```php
177 | getSdk(); // Returns an instanceof Auth0\SDK\Auth0
181 | ```
182 |
183 | Please direct questions about developing with the Auth0-PHP SDK to the [Auth0 Community](https://community.auth0.com), and issues or feature requests to [it's respective repository](https://github.com/auth0/auth0-PHP). Documentations and examples on working with the Auth0-PHP SDKs are also available from [its repository](https://github.com/auth0/auth0-PHP).
184 |
185 | ## Support Policy
186 |
187 | - Our PHP version support window mirrors the [PHP release support schedule](https://www.php.net/supported-versions.php). Our support for PHP versions ends when they stop receiving security fixes.
188 | - As Automattic's stated policy is "security patches are backported when possible, but this is not guaranteed," we only support [the latest release](https://wordpress.org/news/category/releases/) marked as ["actively supported"](https://endoflife.date/wordpress) by Automattic.
189 |
190 | | Plugin Version | WordPress Version | PHP Version | Support Ends |
191 | | -------------- | ----------------- | ----------- | ------------ |
192 | | 5 | 6 | 8.3 | Nov 2026 |
193 | | | | 8.2 | Dec 2025 |
194 | | | | 8.1 | Nov 2024 |
195 |
196 | Composer and WordPress do not offer upgrades to incompatible versions. Therefore, we regularly deprecate support within the plugin for PHP or WordPress versions that have reached end-of-life. These deprecations are not considered breaking changes and will not result in a major version bump.
197 |
198 | Sites running unsupported versions of PHP or WordPress will continue to function but will not receive updates until their environment is upgraded. For your security, please ensure your PHP runtime and WordPress remain up to date.
199 |
200 | ## Feedback
201 |
202 | ### Contributing
203 |
204 | We appreciate feedback and contribution to this repo! Before you get started, please see the following:
205 |
206 | - [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
207 | - [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
208 |
209 | ### Raise an issue
210 |
211 | To provide feedback or report a bug, [please raise an issue on our issue tracker](https://github.com/auth0/wp-auth0/issues).
212 |
213 | ### Vulnerability Reporting
214 |
215 | Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
216 |
217 | ---
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
Auth0 is an easy-to-implement, adaptable authentication and authorization platform.
228 | To learn more checkout Why Auth0?
229 |
230 |
This project is licensed under the MIT license. See the LICENSE file for more info.