Hello I am building a flow in which I have superadmin on root domain and other users on subdomain when I invite user from super admin i am following pkce flow after verify otp i redirect user to password setup page where user able to add password but problem is that verify otp create session for root domain after my nextjs proxy see that user is logged in it redriect user to subdomain password setup where session is not available and user is not able to update password.
The user is implementing a flow where a superadmin on the root domain invites users on a subdomain. After verifying OTP using the PKCE flow, users are redirected to a password setup page. However, the session is created for the root domain, causing issues when users are redirected to the subdomain, where the session is unavailable, preventing password updates.