Mono Support Single Sign On with NopCommerce 

Viewed 11149 time(s), 3 post(s), 7/1/2014 12:40:54 PM - by alasdair.robertson@escrivo.com
7/1/2014 12:40:55 PM
20 Reputation 2 Total posts

Hi, this question appears to have been asked before (http://www.mono-software.com/Mono/Pages/Discussion/dtopic/0lOJgaJik0eB9p-0AJZJAg/Single-Sign-On-and-integration-with-NopCommerce/) but I can't access the topic.

I'm trying to tie a monox site and a nopcommerce site together with a single sign on so users won't need to login to both.
The sites are running as sub domains - monox.mysite.com and shop.mysite.com.
I've gone through the basic steps setting the forms auth for both applications and the machine/encryption keys

<authentication mode="Forms">
      <forms name=".MYSITE-AUTH" loginUrl="/login" protection="All" timeout="43200" path="/" requireSSL="false" slidingExpiration="true"  domain=".mysite.com" enableCrossAppRedirects="true" cookieless="UseCookies"/>
    </authentication>
I can login to either site but that seems to destroy the cookie from the other site and the session is lost.
Nop uses the HttpContextBase User variable to work out who is logged in and creates it's own FormsAuthenticationTicket to do so, this doesn't seem to be set in the Monox cookie

Has anyone been able to get this to work or have any suggestions about where I should try next?
Thanks!

1
7/1/2014 2:43:47 PM
1384 Reputation 152 Total posts

Hi,

Are your applications using the same database? If not and you want to keep them separate you will need to implement custom membership provider (and role provider).

see here for more discussion on the topic:
External-forms-authentication
Integrating-MonoX-with-another-database

Regards,
Igor

2
7/2/2014 2:03:57 PM
20 Reputation 2 Total posts

Thanks Igor, I'll give that a try and see how it goes.

3
This is a demo site for MonoX. Please visit Mono Software for more info.