Demo to preview the settings
Introduction
Sign up and log in users with their Reddit credentials. You can also retrieve user details for the authenticated user.
Prerequisites
- You must have the Reddit account.
How to set up
Register your application
Log in to your Reddit account and navigate to this page: https://www.reddit.com/prefs/apps
Scroll down to the bottom until you see the create another app... button.
Fill in your app's name, description, about URL and redirect URI to proceed to the next step.
Make sure your redirect uri is the exact url of the page that triggers the "signup/login with Reddit" action.
Copy Client ID and Secret
The first greyed out box is your Client ID, and the second greyed out box is your App Secret. Copy these two values and paste them into the plugin settings area in your app.
Now copy these two values into your plugin settings area:
Client ID goes to App ID/API Key.
Client Secret goes to App Secret.
Create a User-Agent ID
Follow this link to learn more about Reddit's requirements for this User-Agent ID. You'll want to follow this format:
javascript<platform>:<app ID>:<version string> (by /u/<reddit username>)
For example:
javascriptUser-Agent: android:com.example.myredditapp:v1.2.3 (by /u/kemitche)
Paste your ID into the input just below your plugin's App Secret input:
Signup / Login Workflow
Add a button to your page design to trigger the signup / login with social network action, and select "Reddit" as the OAuth provider:
The user will be taken to a login screen to enter their Reddit credentials and accept this authorization:
Once they're authorized, they'll automatically be redirected back to your Bubble app and be logged in.
User Information
This plugin also comes with a data source to get extra information about the authenticated user.
For example, you can set up a group with this data source to display these details -- just select "Get data from external API", then choose "Reddit - Get Authenticated User"
Make sure the Group's "Type of content" is also "Get Authenticated User (Reddit)"
Now, inside the group, you can display that Reddit user's information. Open the dropdown like in the below screenshot to see all of the available fields you can display about the User.
Now you're ready to authenticate your users with their Reddit accounts!
Changelogs
Update 31.03.23 - Version 1.1.0
- Updated documentation
Update 06.02.18 - Version 1.0.0
- v1 Signup/Login with Reddit