# Login on discourse using mastodon credentials

**URL:** https://meta.discourse.org/t/login-on-discourse-using-mastodon-credentials/91445
**Category:** SSO
**Created:** [3 ביולי,‏ 2018,‏ 7:02am UTC](https://meta.discourse.org/t/login-on-discourse-using-mastodon-credentials/91445 "2018-07-03T07:02:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![amit\_ncert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amit_ncert/32/137956_2.png) [@amit\_ncert](https://meta.discourse.org/u/amit_ncert)
#### Post date: [3 ביולי,‏ 2018,‏ 7:02am UTC](https://meta.discourse.org/t/login-on-discourse-using-mastodon-credentials/91445/1 "2018-07-03T07:02:46Z")

</div>

Is there any way to integrate mastodon login on disocurse? If yes then how can I do that.

---

<div class="post-metadata">

### Author: ![mikechristopher](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mikechristopher/32/89135_2.png) [@mikechristopher](https://meta.discourse.org/u/mikechristopher)
#### Post date: [3 ביולי,‏ 2018,‏ 9:09am UTC](https://meta.discourse.org/t/login-on-discourse-using-mastodon-credentials/91445/2 "2018-07-03T09:09:33Z")

</div>

Doesnt look like it is possible at the moment but there has been discussion on it here:

[https://discourse.joinmastodon.org/t/single-sign-on-with-discourse/766](https://discourse.joinmastodon.org/t/single-sign-on-with-discourse/766)

---

<div class="post-metadata">

### Author: ![taicv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/taicv/32/167864_2.png) [@taicv](https://meta.discourse.org/u/taicv)
#### Post date: [19 בדצמבר,‏ 2019,‏ 5:31pm UTC](https://meta.discourse.org/t/login-on-discourse-using-mastodon-credentials/91445/3 "2019-12-19T17:31:34Z")

</div>

1. Install this plugin to enable OAuth2  
[GitHub - discourse/discourse-oauth2-basic: A basic OAuth2 plugin for use with Discourse · GitHub](https://github.com/discourse/discourse-oauth2-basic)

2. Create a Application on Mastodon

> Application name: Discourse Login  
> Application website:https://\<YOUR\_DISCOURSE\>/auth/oauth2\_basic/callback  
> Redirect URI: https://\<YOUR\_DISCOURSE\>/auth/oauth2\_basic/callback

1. Setup OAuth2 Plugin on Discourse

> oauth2 client id: Your Mastodon App Client key  
> oauth2 client secret: Your Mastodon App Client secret  
> oauth2 authorize url: https://\<YOUR\_MASTODON\>/oauth/authorize  
> oauth2 token url: https://\<YOUR\_MASTODON\>/oauth/token  
> oauth2 user json url: https://\<YOUR\_MASTODON\>/api/v1/accounts/verify\_credentials  
> oauth2 json user id path: id  
> oauth2 json username path: username  
> oauth2 json name path: display\_name  
> oauth2 json avatar path: avatar

Related thread:

> [@Discourse OAuth2 Basic](https://meta.discourse.org/t/oauth2-basic-support/33879):
>
> discourse2Summary Discourse OAuth2 Basic supports basic OAuth2 providers, assuming they have a JSON API endpoint where user details can be retrieved by token.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features This plugin allows you to use a basic OAuth2 provider as authentication for Discourse. It should work with many providers, with the caveat that they must provide a JSON endpoint for retri…

> [@Configure sign up and log in with Auth0 using the OAuth2 Basic Plugin](https://meta.discourse.org/t/how-to-use-auth0-with-the-oauth2-basic-plugin/64633):
>
> If you are using [Auth0](https://auth0.com/) as your identity provider this guide will show you how to setup authentication using the [Discourse OAuth2 Basic Plugin](https://meta.discourse.org/t/oauth2-basic-support/33879). Initial Steps Create an Auth0 account if you don’t already have one The [Discourse OAuth2 Basic Plugin](https://meta.discourse.org/t/oauth2-basic-support/33879) ships pre-installed with Discourse. If you are self-hosted, ensure the plugin is enabled. For [hosted plans](https://www.discourse.org/pricing), the plugin is available on Business tier and above. Configure Auth0 Applications → Create Application Give your client a name like “Discourse…
