# How to perform SSO using Discourse and Auth0?

**URL:** <https://community.auth0.com/t/how-to-perform-sso-using-discourse-and-auth0/8230>\
**Category:** Get Help\
**Tags:** sso-integration, sso-integrations, sso, auth0\
**Created:** [September 18, 2017, 9:19pm UTC](https://community.auth0.com/t/how-to-perform-sso-using-discourse-and-auth0/8230 "2017-09-18T21:19:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![presley.cci](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@presley.cci](https://community.auth0.com/u/presley.cci)\
**Post date:** [September 18, 2017, 9:19pm UTC](https://community.auth0.com/t/how-to-perform-sso-using-discourse-and-auth0/8230/1 "2017-09-18T21:19:04Z")

</div>

I am using trying to perform SSO using Auth0 for wordPress and discourse from my own application.  
the flow is mentioned below.  
![alt text][1]  
The user enters user name and password in the application, the details are sent to the server which authenticates the user with the auth0 API and send back the token.  
I have installed [auth0 SSO plugin](https://github.com/auth0/discourse-plugin) from GitHub in Discourse and all the client ID, client secrets are added to the plugin.

I want to know who to perform SSO in case of Discourse when I have logged into my application.

For wordPress were are using the following method.

```
<form *ngIf="userService.isAuthenticated()" ngNoForm action="http://xx.xx.xx.xx/index.php?auth0=implicit&client_id=xxxxxxxxxxxxxxxxxxxxxxxxx&connection=xxxxxxxxxx"
        method="post">
        <input class="hidden" type="text" id="token" name="token" value="{{tokenValueIsHereReturnedbyAuth0Authentication}}" />
        <input class="hidden" type="text" id="redirect_to" name="redirect_to" value="http://xx.xx.xx.xx/index.html" />
        <input class="btn btn-primary pull-right" type="submit" value="View" />
</form>

```

So How to do similar thing in discourse?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/how-to-perform-sso-using-discourse-and-auth0/8230/2 "2018-03-02T05:56:34Z")

</div>


