I am creating custom module which redirect to login if third party module route id find.(frontend)
but i have issue how to identify the current route is default or third party route ?
how to check current route is default or third party ?
I can give you some hint for this problem.
You can try by looking into class
\Magento\Framework\App\Route\Config
at file
vendor/magento/framework/App/Route/Config.php
the function _getRoutes of Magento2 will return list of route's info as below.
(You may have to extend a new class from this because the scope of function is protected )
Based on current route as a frontName, you can extract the module info of this route as modules. From that you can know whether this module belong to Magento 2 default route or not.
I hope this will work for you.