Getting password info via SSO, SAML or JWT and restricting subdomain access

I was writing to find out if there is a way to get account access via SSO, SAML or JWT for use with other technologies like AWS, Google Cloud, or Firebase.

I also wanted to know if it is possible to restrict access to subdomains under the same main domain?

For example, I own domain.com and have the path domain.com/learn restricted to free members only.

I wanted to know if it would be possible to restrict access to subdomain.domain.com entirely for those same free users that have already signed up for my free account.

1 Like

Hi Adrian,

We don’t have SSO yet, but it’s on our roadmap.

For restricting access on subdomains you will need to use a bit of custom code. It should be pretty straightforward though.

Ultimately, you will need to use our JS hook to check the status of the member’s membership. If they aren’t free members in your case, just redirect them to any page you want.

MemberStack.onReady.then(function(member) {

   var membership = member.membership

    if (membership.id !== "YOUR_FREE_MEMBERSHIP_ID") {
        //redirect users
        window.location.replace("/access-denied")
    }

})

You would want to put the above script right below your MemberStack script.

1 Like

I’m familiar with JS hooks.

So I would need to create an /access-denied page in my website’s root folder or in my sub-domain’s root folder?

I’m also assuming that I could use this hook to check for all of my membership IDs and if none of them are true then redirect to the /access-denied location.

Finally, are there any other JS hooks you recommend or is there an documentation around other available hooks?

1 Like

Hello. Just checking if the SSO, specifically for Microsoft Azure AD, has a ETA. Thanks in advnce!

1 Like

Hey @chadever13,

Thanks for checking in!

We can’t give exact ETA’s, but we hope to have something ready in the next year. We are currently in the process of expanding our dev team so we can get lots new features released🎉

2 Likes

Hey Molly, checking back on SSO connection.