MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Single Sign On with NopCommerce  (Mono Support )

Viewed 5100 time(s), 3 post(s) 7/1/2014 12:40:54 PMby alasdair.robertson@escrivo.com
alasdair-robertson-escrivo-com

alasdair.robertson@escrivo.com

7/1/2014 12:40:55 PM
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!
This content has not been rated yet. 
20 Reputation 2 Total posts
idrazic

idrazic

7/1/2014 2:43:47 PM
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
This content has not been rated yet. 
1384 Reputation 152 Total posts
alasdair-robertson-escrivo-com

alasdair.robertson@escrivo.com

7/2/2014 2:03:57 PM
Thanks Igor, I'll give that a try and see how it goes.
This content has not been rated yet. 
20 Reputation 2 Total posts