# Issues using SSO in custom web app

**URL:** <https://meta.discourse.org/t/issues-using-sso-in-custom-web-app/77429>\
**Category:** Development\
**Created:** [Janeiro 6, 2018, 6:30am UTC](https://meta.discourse.org/t/issues-using-sso-in-custom-web-app/77429 "2018-01-06T06:30:49Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [Janeiro 7, 2018, 10:58pm UTC](https://meta.discourse.org/t/issues-using-sso-in-custom-web-app/77429/5 "2018-01-07T22:58:10Z")

</div>

One option here is amending the default current user provider via a plugin:

> <https://github.com/discourse/discourse/blob/main/lib/auth/default_current_user_provider.rb>

Inheriting off this and adding custom logic to look at parent cookie, then in parent cookie also store the expected user name, if mismatching, nuke cookies.

I am not entirely against amending it so you can force sso when you are already authenticated via a cookie, but it needs to be carefully tested.

---

_[View the full topic](https://meta.discourse.org/t/issues-using-sso-in-custom-web-app/77429)._
