# Can I use the Discourse API to authenticate users in another app?

**URL:** <https://meta.discourse.org/t/can-i-use-the-discourse-api-to-authenticate-users-in-another-app/266322>\
**Category:** SSO\
**Created:** [May 26, 2023, 2:29pm UTC](https://meta.discourse.org/t/can-i-use-the-discourse-api-to-authenticate-users-in-another-app/266322 "2023-05-26T14:29:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [May 26, 2023, 3:53pm UTC](https://meta.discourse.org/t/can-i-use-the-discourse-api-to-authenticate-users-in-another-app/266322/4 "2023-05-26T15:53:28Z")

</div>

> [@ygramoel](#):
>
> I want to outsource all login operations to Discourse. Is there a way to use [DiscourseConnect](https://meta.discourse.org/t/13045) to do that?

Yes, absolutely.

The tricky thing is that there is a shared secret between the provider (Discourse) and the consumer (your app). If you distribute your app, users will have access to all secrets in it.

Putting auth-proxy in front of a custom minimal web service that gives a signed token to your app might work well.

I’m sure there’s other ways of doing this I’m not thinking of.

---

_[View the full topic](https://meta.discourse.org/t/can-i-use-the-discourse-api-to-authenticate-users-in-another-app/266322)._
