Skip to main content
Version: v0.15

Reddit

Reddit is a social news aggregation, web content rating, and discussion website.
It provides third party oAuth2 authentication. In this tutorial, we will set up Reddit as an authentication provider for Conduit.

Create a Reddit App

  1. Go to Reddit Apps and click on the create an app button.
  2. Fill in the details as shown below and click on the create app button.
  3. Copy the client id and client secret and save it for later use.

Setting up the configuration

NOTE
Do not forget to configure the Reddit provider through the Admin Panel.
Go to the Authentication -> SIGN IN METHODS and select the Reddit provider.
Then, fill the required fields you obtained from the Reddit App.

Authenticate with Reddit

To begin authenticating with Reddit you request a redirect url with the proper scopes

Request
curl --location --request GET 'http://localhost:3000/authentication/init/reddit'
Response
{
"result": "https://www.reddit.com/api/v1/authorize?client_id=CLIENT_ID&duration=permanent&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fhook%2Fauthentication&response_type=code&scope=identity&state=STATE"
}

Open a browser and navigate to the url returned to you from Conduit. Now the /hook/authentication route has been triggered. Once your browser has been redirected, your authentication has been completed.