Access to XMLHttpRequest at 'https://flutter.rohitchouhan.com/email-otpV2/v2.php' from origin 'http://localhost:9839' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. #27
I am utilising your package to send OTP to the user's entered email address but it is giving me the CORS access error. I cannot upgrade the package from email_opt 2.0.1 to the latest one since then many dependencies need to be modified due to email_otp latest version relying on newer version of https package. Can you see if you could incorporate the CORS permission on your older version as well. Here is the error:
Access to XMLHttpRequest at 'https://flutter.rohitchouhan.com/email-otpV2/v2.php' from origin 'http://localhost:9839' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Uncaught (in promise) Error
at Object.createErrorWithStack (errors.dart:329:10)
at Error._throw (core_patch.dart:265:28)
at Error.throwWithStackTrace (errors.dart:120:5)
at async._AsyncCallbackEntry.new.callback (zone.dart:1386:11)
at Object._microtaskLoop (schedule_microtask.dart:40:11)
at _startMicrotaskLoop (schedule_microtask.dart:49:5)
at async_patch.dart:181:7
I am utilising your package to send OTP to the user's entered email address but it is giving me the CORS access error. I cannot upgrade the package from email_opt 2.0.1 to the latest one since then many dependencies need to be modified due to email_otp latest version relying on newer version of https package. Can you see if you could incorporate the CORS permission on your older version as well. Here is the error:
Access to XMLHttpRequest at 'https://flutter.rohitchouhan.com/email-otpV2/v2.php' from origin 'http://localhost:9839' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
POST https://flutter.rohitchouhan.com/email-otpV2/v2.php net::ERR_FAILED
Uncaught (in promise) Error at Object.createErrorWithStack (errors.dart:329:10) at Error._throw (core_patch.dart:265:28) at Error.throwWithStackTrace (errors.dart:120:5) at async._AsyncCallbackEntry.new.callback (zone.dart:1386:11) at Object._microtaskLoop (schedule_microtask.dart:40:11) at _startMicrotaskLoop (schedule_microtask.dart:49:5) at async_patch.dart:181:7