Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update custom reddit provider to v4 #4985

Merged
merged 3 commits into from Jul 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 22 additions & 19 deletions docs/docs/providers/reddit.md
Expand Up @@ -47,25 +47,28 @@ This Provider template only has a one hour access token to it and only has the "
```js
providers: [
{
id: "reddit",
name: "Reddit",
clientId: process.env.REDDIT_CLIENT_ID,
clientSecret: process.env.REDDIT_CLIENT_SECRET,
scope: "identity mysubreddits read", //Check Reddit API Documentation for more. The identity scope is required.
type: "oauth",
version: "2.0",
params: { grant_type: "authorization_code" },
accessTokenUrl: " https://www.reddit.com/api/v1/access_token",
authorizationUrl:
"https://www.reddit.com/api/v1/authorize?response_type=code&duration=permanent",
profileUrl: "https://oauth.reddit.com/api/v1/me",
profile: (profile) => {
return {
id: profile.id,
name: profile.name,
email: null,
}
},
id: 'reddit',
dgrcode marked this conversation as resolved.
Show resolved Hide resolved
name: 'Reddit',
clientId: process.env.REDDIT_CLIENT_ID,
clientSecret: process.env.REDDIT_CLIENT_SECRET,
authorization: {
url: 'https://www.reddit.com/api/v1/authorize?response_type=code&duration=permanent',
params: { scope: 'identity mysubreddits read' },
},
type: 'oauth',
version: '2.0',
token: {
url: 'https://www.reddit.com/api/v1/access_token',
params: { grant_type: 'authorization_code' },
},
userinfo: 'https://oauth.reddit.com/api/v1/me',
profile: profile => {
return {
id: profile.id,
name: profile.name,
email: null,
}
},
},
]
```
Expand Down