# Shibboleth SSO with Discourse

**URL:** https://meta.discourse.org/t/shibboleth-sso-with-discourse/142401
**Category:** SSO
**Created:** [February 23, 2020, 5:01pm UTC](https://meta.discourse.org/t/shibboleth-sso-with-discourse/142401 "2020-02-23T17:01:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gi1242](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@gi1242](https://meta.discourse.org/u/gi1242)
#### Post date: [February 23, 2020, 5:01pm UTC](https://meta.discourse.org/t/shibboleth-sso-with-discourse/142401/1 "2020-02-23T17:01:48Z")

</div>

Hi All,

I finally got my Discourse site integrated with Shibboleth. It was simple, … once I figured it out 😂.

1. Get Shibboleth working on one web server (need not be the same as your discourse server). Lets call it `shib.univ.edu`.

2. Get a directory on `shib.univ.edu` for doing the [Discourse SSO](https://meta.discourse.org/t/13045?silent=true). Let’s call it `discourse-sso`.

3. Protect this directory using Shibboleth. If you’re using Apache, it usually means putting something like this in `discourse-sso/.htaccess`:

4. Get a library that does the signing work described in the [official Discourse SSO guide](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045). I use [cviebrock/discourse-php](https://github.com/cviebrock/discourse-php). Create `sso.php` in here copied from the usage instructions.

5. Your `username` and `email` will be in the environment variable `eppn`. So if you followed the usage instructions described in **cviebrock/discourse-php** (link above), then you should just set

6. Enable the SSO from the official [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) guide. Make your `sso url` point to `https://shib.univ.edu/discourse-sso/sso.php` and you should be good.

GI
