سؤال

I have just deployed a site built using Meteor 0.7.2, which is served at both example.com and www.example.com.

If a user signs in on one (e.g. www.example.com), they are not signed in on the other (e.g. example.com).

Is there a way to have a single sign-in across the two subdomains? Or should I simply redirect the user away from one of them?

Thanks!

هل كانت مفيدة؟

المحلول

Meteor uses localStorage (instead of session cookies) for storing authentication information. This localStorage is not accessible to any other site, including super-domains. Hence, redirecting, IMO, is the best option here.

نصائح أخرى

You can achieve this by rolling your own API by extending accounts Oauth Check out this article: http://meteorhacks.com/extending-meteor-accounts.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top