Cross Domain Login – How to log a user in automatically when transferred from one domain to another

Single sign-on (SSO) is conceptually pretty simple. User hits domain1.com. domain1.com sees there’s no session cookie. domain1.com redirects to sso.com sso.com presents login page, and take credentials sso.com sets session cookie for the user sso.com then redirects back to domain1 to a special url (like domain1.com/ssologin) the ssologin URL contains a parameter that is basically … Read more

Custom domain for GitHub project pages

1/23/19 UPDATE: Things have changed quite a bit (for the better) since my last answer. This updated answer will show you how to configure: Root apex (example.com) Sub-domain (www.example.com) HTTPS (optional but strongly encouraged) In the end, all requests to example.com will be re-directed to https://www.example.com (or http:// if you choose NOT to use HTTPS). … Read more

Get the subdomain from a URL

Anyone have any great ideas besides storing a list of all TLDs? No, because each TLD differs on what counts as a subdomain, second level domain, etc. Keep in mind that there are top level domains, second level domains, and subdomains. Technically speaking, everything except the TLD is a subdomain. In the domain.com.uk example, “domain” … Read more