Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itaibo/reddit-oauth2-flow
Next.js application to get Reddit tokens for CLI apps
https://github.com/itaibo/reddit-oauth2-flow
cli login nextjs oauth2 reddit token ui
Last synced: about 2 months ago
JSON representation
Next.js application to get Reddit tokens for CLI apps
- Host: GitHub
- URL: https://github.com/itaibo/reddit-oauth2-flow
- Owner: itaibo
- Created: 2022-02-28T15:08:16.000Z (almost 3 years ago)
- Default Branch: develop
- Last Pushed: 2022-04-04T10:07:40.000Z (almost 3 years ago)
- Last Synced: 2023-03-06T01:33:54.624Z (almost 2 years ago)
- Topics: cli, login, nextjs, oauth2, reddit, token, ui
- Language: JavaScript
- Homepage: https://reddit-oauth2-flow.vercel.app
- Size: 334 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Reddit OAuth2 Flow
Next.js application to get Reddit tokens using their [OAuth2 specification](https://github.com/reddit-archive/reddit/wiki/OAuth2)[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fitaibo%2Freddit-oauth2-flow)
## Why use this?
When creating a CLI application, you need your user's token to manage their Reddit account. This UI lets your user get their token in a friendly and easy way. Then, they can copy/paste their token into your application## Configuration
To work properly, some environment variables are required. You will need to [create a Reddit app](https://www.reddit.com/prefs/apps)|Environment variable|Description|
|---|---|
|`NEXT_PUBLIC_REDDIT_CLIENT_ID`|Your Reddit's app client id|
|`REDDIT_CLIENT_SECRET`|Your Reddit's app client secret|
|`NEXT_PUBLIC_REDIRECT_URI`|Your Reddit's app redirect uri, that must be the same as the URL you are deploying this application to. Remember to append `/callback`. Will look like `https://your-deployment.vercel.app/callback`|
|`NEXT_PUBLIC_TOKEN_DURATION`|Either `temporary` or `permanent`. Learn more in the [Reddit OAuth2 specification](https://github.com/reddit-archive/reddit/wiki/OAuth2#authorization)|
|`NEXT_PUBLIC_TOKEN_SCOPE`|A space separated list of scope string. Get the list of scopes and learn more in the [Reddit OAuth2 specification](https://github.com/reddit-archive/reddit/wiki/OAuth2#authorization)|## Contributing
Contributions are welcomed!## Attribution
If you deploy the app, or create your own customizations, please consider keeping the attribution to this repository located in the footer