# Bratwurst: the wurst possible production DiscourseConnect provider

**URL:** https://meta.discourse.org/t/bratwurst-the-wurst-possible-production-discourseconnect-provider/72343
**Category:** SSO
**Created:** [October 18, 2017, 3:01pm UTC](https://meta.discourse.org/t/bratwurst-the-wurst-possible-production-discourseconnect-provider/72343 "2017-10-18T15:01:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [October 18, 2017, 3:01pm UTC](https://meta.discourse.org/t/bratwurst-the-wurst-possible-production-discourseconnect-provider/72343/1 "2017-10-18T15:01:27Z")

</div>

I felt like making something the other night, so I implemented an [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) provider that is useful for development and testing:

[https://github.com/Supermathie/bratwurst](https://github.com/Supermathie/bratwurst)

The utility of this is to be able to configure an SSO backend so that you can test out the behaviour of Discourse with different scenarios from an external provider (e.g. “What happens if two users have the same email but different external IDs? What happens if the external ID changes? What happens if two users have the same username?”)

It 100% trusts the user to enter the correct response values. Fun!

If you’re already set up for development you should be able to clone the repo:

```
$ git clone https://github.com/Supermathie/bratwurst.git

```

Install gems:

```
$ bundle install

```

and run the server:

```
$ rails server -b '[::]' -p 3333

```

then test by pointing your browser at `http://localhost:3333/`.

To run it against a local development mode Discourse, configure your SSO URL to be: `http://localhost:3333/sso` and this secret as the default: `thisisabadideatouseoutsideofssotesting`

Screenshot in action:

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/5/7/157f9a4aa485931c418b8bcc8f62503390e20eb1.png)

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [April 24, 2018, 10:25pm UTC](https://meta.discourse.org/t/bratwurst-the-wurst-possible-production-discourseconnect-provider/72343/2 "2018-04-24T22:25:05Z")

</div>

Just adding this here in case someone is in need of yet another example of how to do this in ruby:

[https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045/372?u=blake](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045/372)

[https://github.com/oblakeerickson/sso\_endpoint](https://github.com/oblakeerickson/sso_endpoint)

> <https://github.com/oblakeerickson/sso_endpoint/blob/master/README.md>
