Single sign in for multistore.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hi,

I'm using Nop 3.30 along with multistore.

for example,

http://www.abc.com
http://site1.abc.com
http://site2.abc.com

I want to customer automatically logged in when customer is already logged in one of the site. It should not ask for log in again.

For example,

Customer is already logged in on http://site1.abc.com. Now, customer is trying to request on http://www.abc.com then it should be automatically logged in on same site.

Is it possible to do with current Nop multi-store feature? Is there any advice how to do this?
9 years ago
We need also this feature. Is there anyone in community who has achieve this feature? or any other idea on this?
9 years ago
Is there a solution in nopcommerce 3.4?
9 years ago
Try this:

http://msdn.microsoft.com/en-us/library/vstudio/eb0zx8fc%28v=vs.100%29.aspx
9 years ago
In fact if it's across the same domain, just setting the "domain" attribute of "forms" element in web.config is enough.

Try this:

http://tmd1.pronopcommerce.com
http://tmd2.pronopcommerce.com]http://tmd2.pronopcommerce.com

(feel free to create test users on the site)

and the web.config is:

<forms name="NOPCOMMERCE.AUTH" loginUrl="~/login" protection="All" timeout="43200" path="/" domain="pronopcommerce.com" requireSSL="false" slidingExpiration="true" />


NOTE: I just added doman="pronopcommerce.com".
9 years ago
One thing to note though, some features are limited to stores, such as cart. So even if they can log in as the same user across TMD1 and TMD2 in my previous example, the cart is still different - cart added in TMD1 is not carried over to TMD2. This is due to nopCommerce's coding.
9 years ago
Thank you wooncherk. :) Your solution is useful. But we have extended our requirements like if we have following use case then can we use single sign in?

1. www.abc.com (main domain)
2. seller1.abc.com (seller1's domain)
3. xyz.com (vendor xyz's store but in multistore with www.abc.com)

Is this scenario possible?
Can we have single sign in this case?
9 years ago
SuperNopCommerce wrote:
Thank you wooncherk. :) Your solution is useful. But we have extended our requirements like if we have following use case then can we use single sign in?

1. www.abc.com (main domain)
2. seller1.abc.com (seller1's domain)
3. xyz.com (vendor xyz's store but in multistore with www.abc.com)

Is this scenario possible?
Can we have single sign in this case?


Cross-domain cookie is much trickier... Perhaps you can try this: http://stackoverflow.com/questions/3342140/cross-domain-cookies. :D
9 years ago
SuperNopCommerce wrote:
Thank you wooncherk. :) Your solution is useful. But we have extended our requirements like if we have following use case then can we use single sign in?

1. www.abc.com (main domain)
2. seller1.abc.com (seller1's domain)
3. xyz.com (vendor xyz's store but in multistore with www.abc.com)

Is this scenario possible?
Can we have single sign in this case?


It helps you.

http://www.codeproject.com/Articles/106439/Single-Sign-On-SSO-for-cross-domain-ASP-NET-applic
9 years ago
Hello-

I just created my second store to run on my nopcommerce instance, and it is working, but when I try to login to it using my login info from store1, nothing happens. I expected to be logged in to store 2, and then if I changed url to store1 domain, that I would also be logged in to it.

But, it does not log me in to either site....just returns me to login screen.

My web.config includes both a forms authentication mode and a machinekey (values hidden for security):

    <authentication mode="Forms">
      <forms name="NOPCOMMERCE.AUTH" domain="mydomain.com" loginUrl="~/login" protection="All" timeout="43200" path="/" requireSSL="false" slidingExpiration="true" />
    </authentication>


    <machineKey compatibilityMode="Framework20SP1" validationKey="################################" decryptionKey="######################################" validation="SHA1" decryption="AES" />

Can you specify both domains in the forms authentication section??
e.g.   domain="mydomain.com,myotherdomain.com"

What am I missing here?

Steve
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.