Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

soixt's avatar
Level 1

How to authorize auth user from subdomain

Hey.

I've been wondering how to authorize auth user from sub domain without allowing wildcard within session config. I can't use wildcard in session config because I want to login users per subdomain only, but not sure how to keep it within two domains. my.app and site-one.my.app. Why I need this is simply because of instagram apps and api, since I can't find how to programically set the callback url besides setting one directly in app config. It would be painful to manually enter new subdomain inside app config each time. Anyway, my last few brain cells saw option to somehow generate a login link for my.app with current user details and to redirect to ig from my.app instead of site-one.my.app.

But I am wondering is the a better solution to achieve this?

Thanks

0 likes
0 replies

Please or to participate in this conversation.