I have a secure domain with a separate context where I am logging a user in as 'userx'. I then want them to be able to access some resources on my 'web' context that require membership in a user group that 'userx' is a member of.
However, the problem seems to be that even though the user is logged in as 'userx' in my 'secure' context, they are still 'anonymous' in my web context.
How would I (through snippet API code) get the 'web' context to recognize that the user has logged in & is no longer anonymous?
-
- 5,888 Posts
I think you can a user programmatically log in to a context by
$user->addSessionContext('web');
This will ONLY work if web and secure are the same domain (or subdomains of the same domain and you have session cookies configured to support that). Is this the case here?
They ARE subdomains of the same domain.
I almost surely do not "have session cookies configured to support that". What steps do I need to follow to do so?
Great! Let us know if you have any other issues...