fix(web): подтверждение email — ссылка в письме, resend в ЛК, редирект#233
Open
Ibochkarev wants to merge 1 commit intobetafrom
Open
fix(web): подтверждение email — ссылка в письме, resend в ЛК, редирект#233Ibochkarev wants to merge 1 commit intobetafrom
Ibochkarev wants to merge 1 commit intobetafrom
Conversation
…verify (#226) - Default verification URL to api.php + verify route; optional ms3_email_verification_url - html=1 + Response redirect; api.php sends Location when redirect set - ms3_email_verification_success_url; CustomerAPI/CustomerUI resend flow - README, lexicons, EmailVerificationUrlTest, CHANGELOG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Устраняет интеграционный разрыв: письмо вело на несуществующий путь
verify-email(не вызывался Web API), кнопка повторной отправки в шаблоне ЛК не была привязана к JS.api.phpсroute=/api/v1/customer/email/verify,token,html=1(опцияms3_email_verification_urlдля кастомного URL). После клика — HTTP-редирект на сайт сms3_email_verified=1|0, опционально цель успехаms3_email_verification_success_url. Запрос сformat=jsonпо-прежнему возвращает JSON.CustomerAPI::resendVerificationEmail, обработка вCustomerUI, селекторы иms3_customer_profile.tpl.Response::redirect, ветка вapi.phpбез раннегоContent-Type: application/jsonпри редиректе;CustomerEmailController::verifyучитываетhtml=1/format=json.readme.md, лексиконы настроек ru/en,php tests/EmailVerificationUrlTest.phpдля URL-сборки.Тип изменений
Связанные Issues
Fixes #226
Как это было протестировано?
Конфигурация тестирования:
fix/gh-226-email-verificationEmailVerificationUrlTest)Проверки:
php -lпо затронутым PHP,phpcsдля тест-скрипта,npx eslintдля изменённого JS,php core/components/minishop3/tests/EmailVerificationUrlTest.php.Скриншоты (если применимо)
Чеклист
Дополнительные заметки
Ревью: при открытии verify без
html=1в браузере по-прежнему возможен «сырой» JSON — поведение описано в README.