Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cross-domain login functionality #575

Open
akramwahid opened this issue May 6, 2024 · 0 comments
Open

cross-domain login functionality #575

akramwahid opened this issue May 6, 2024 · 0 comments

Comments

@akramwahid
Copy link

akramwahid commented May 6, 2024

I am encountering an authentication issue that involves cross-domain login functionality between two Laravel applications. Here's the breakdown of the scenario:

I have two sites under the same domain. The main site, built with Laravel 11 and utilizing Jetstream, resides in the root domain. Additionally, I have a shopping cart application that utilizes the Sentinel package and operates within a subdomain.

Both applications share the same database and user table. Therefore, when a user logs in to the main site, I expect them to be automatically logged in to the shopping subdomain or vice versa.

To achieve this, I have configured both applications with the same APP_KEY, SESSION_DOMAIN, and other relevant settings. Additionally, I have configured the session driver to use the database driver to ensure consistency across both sites.

However, despite these configurations, the cross-domain authentication feature does not function as expected. Upon investigation, I suspect that the issue arises from the difference in auth gurard drivers used by Jetstream's web guard (session driver) and the Sentinel package (sentinel driver).

I seek guidance on resolving this authentication issue and enabling seamless cross-domain login functionality between the two Laravel applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant