# Drupal 8 and Discourse shared SSO

**URL:** https://meta.discourse.org/t/drupal-8-and-discourse-shared-sso/201446
**Category:** SSO
**Created:** [August 23, 2021, 3:09pm UTC](https://meta.discourse.org/t/drupal-8-and-discourse-shared-sso/201446 "2021-08-23T15:09:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mike\_Wellman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mike_wellman/32/201988_2.png) [@Mike\_Wellman](https://meta.discourse.org/u/Mike_Wellman)
#### Post date: [August 23, 2021, 3:09pm UTC](https://meta.discourse.org/t/drupal-8-and-discourse-shared-sso/201446/1 "2021-08-23T15:09:56Z")

</div>

Hello,

I was wonder if anyone has tried doing this or has any tips on how to do this.

We have a Drupal 8 site and a Discourse forum. Both systems use an external site that uses [Laravel Single Sign-On](https://www.miniorange.com/laravel-single-sign-on-(sso)).

What we are trying to do is if you are logged into the Drupal 8 site, you are automatically logged into Discourse. We are using a customized version of [OAuth2 Basic](https://meta.discourse.org/t/oauth2-basic-support/33879) so we can do role management between the system so we can modify as we need to for the Shared Session between the sites.

Drupal is setup as a Subdomain [xxxxx.samemaindomain.com](http://xxxxx.samemaindomain.com)  
Discourse falls under that: [yyyyyy.xxxxx.samemaindomain.com](http://yyyyyy.xxxxx.samemaindomain.com)

Does anyone have any advice on how to move forward with this issue?

Thanks ahead of time.

---

<div class="post-metadata">

### Author: ![JonathanShaw](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathanshaw/32/532672_2.png) [@JonathanShaw](https://meta.discourse.org/u/JonathanShaw)
#### Post date: [August 24, 2021, 3:56pm UTC](https://meta.discourse.org/t/drupal-8-and-discourse-shared-sso/201446/2 "2021-08-24T15:56:32Z")

</div>

I think you can make this work fine with [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true). Discourse queries Drupal to verify a login using [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true), and Drupal queries Laravel via oauth.

The discourse\_sso Drupal contrib module works OK, but it lacks a mechanism for updating of Discourse data when the Drupal user is updated and a working mechanism for logout syncing in both directions.

For these reasons I’ve done most of the work on a better Discourse module for Drupal. Mainly it needs tests. Interested in collaborating?

---

<div class="post-metadata">

### Author: ![MikeNolan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikenolan/32/297597_2.png) [@MikeNolan](https://meta.discourse.org/u/MikeNolan)
#### Post date: [October 17, 2023, 11:55pm UTC](https://meta.discourse.org/t/drupal-8-and-discourse-shared-sso/201446/3 "2023-10-17T23:55:04Z")

</div>

Johnathan, is your drupal sso project still active?

We might be interested in helping with it at the US Chess Federation. (We’re a discourse-hosted site.)
