When you go directly to /admin/login and click the Via <IdP label> button there is no redirect associated to that user with craft.app.user.returnUrl() so the plugin will simply redirect to the homepage. It seems like since the user is accessing the admin login, it should default to /admin (or the admin craft trigger). This would be isolated to that admin login page (the via buttons specifically).
When you go directly to
/admin/login
and click theVia <IdP label>
button there is no redirect associated to that user withcraft.app.user.returnUrl()
so the plugin will simply redirect to the homepage. It seems like since the user is accessing the admin login, it should default to/admin
(or the admin craft trigger). This would be isolated to that admin login page (the via buttons specifically).