I want to offer a membership where Premium members will gain access to a library of resources.
I want to build the library of resources on a different Ghost theme and use a subdomain. Members should have automatic access to the library when they are signed in.
Is this posible? Thank you so much for any tips or directions.
2 Likes
Love the idea of this!
As there is no out-of-the-box solution, implementing it might require a bit of manual work though.
Let’s break this down:
The key challenge here is keeping the memberships in sync across both domains. Here’s a potential game plan:
- When a new member signs up on your main domain, it triggers an action. This could be handled with the “Member Created” trigger on Zapier, or a “member.added” event for a custom webhook.
- The next step is to check if this new member has joined the correct membership tier.
- If they have, create the same member profile on your subdomain. This could be done using the “Create Member” action on Zapier or by sending a POST request to
/ghost/api/admin/members/
.
Now, a few important considerations:
- Member management is a two-way street. If a member unsubscribes or cancels their membership on one site, you’d need to ensure they’re removed from the other one too.
- User profile settings would be independent on both sites. This might be a bit confusing for some users, so it’s something to keep in mind.
- Automatic login for a member across both sites isn’t straightforward, unless you’re willing to delve deep and modify the Ghost core. However, I’d advise against that and recommend exploring alternative solutions.
- A word of caution - the Ghost members API isn’t officially documented and could change unexpectedly. The information I have is from this post and this blog article.
I hope this helps. Let me know if anything is unclear!
Thank you so much!
I was considering Zapier as a solution and will test it around. However, I think the single biggest drawback of the setup I proposed is from a user experience point-of-view. Managing two different accounts may seem a bit confusing if it is not clearly conveyed to a user.
Another risk is the one you pointed out, it would require some work in the core, and that’s something I’d like to avoid (don’t want to break anything down the road).
I will try different setups with Zapier and see how it goes. I very much appriciate your post.
Totally agree with you. The UX aspect is the one to think about.
Out of curiosity: are you just doing it for the different design or are there reasons for the subdomain?
If it’s just the design aspect, you could technically create a super-custom theme and add specific pages that are only accessible to premium members and are styled in the design you’d want.
You could use the @member object and some custom queries for that.
Compared to the Zapier solution, this would, however, require quite some custom coding on the theme’s side.
I have one themse for blogging, and then I’d like to offer a library with resources for paying subscribers using another theme (e.g. Rinne). That’s the gist of it.
This, to me, seems like it’s more trouble than it’s worth. I would not recommend going this route as it is rife with potential spots for manual error or confusion. The severity in which these potential errors scales with how many sub domains you are running on.
The proper solution is to write a plugin that does all of this for you. It would likely require a fork of ghost and writing custom login logic around their authentication service. This would theoretically be pretty straight forward.
Now, a few important considerations:
All of these are the reasons why this should be avoided by any serious project. These should be non starters for this solution.
I appreciate the creativity but this is a no from me.
Cheers.
You should invest in extending or combining these themes instead of over engineering this. It should be very straight forward to combine these themes.
1 Like