This project demonstrates how to integrate LinkedIn authentication and retrieve user profile information using a Flask application.
This application allows users to authenticate via LinkedIn OAuth 2.0, retrieve their profile information, and perform actions such as posting on LinkedIn using their credentials.
Before getting started, ensure you have the following:
- LinkedIn Developer Account: Register your application on LinkedIn Developer Portal to obtain
CLIENT_IDandCLIENT_SECRET. - Python 3.x installed on your system.
- Basic knowledge of Flask and OAuth 2.0.
-
LinkedIn App Credentials:
- Obtain
CLIENT_IDandCLIENT_SECRETfrom LinkedIn Developer Portal. - Set
REDIRECT_URIto match the callback URL configured in your LinkedIn app.
- Obtain
-
Scopes:
- Defined the scopes required for the application. Example:
['openid', 'profile', 'w_member_social', 'email'].
- Defined the scopes required for the application. Example:
- Clone the repository
- Install dependencies:
pip install -r requirements.txtRun the Flask application:
python app.pyOpen a web browser and navigate to http://127.0.0.1:5000.
Click on the "Login with LinkedIn" button.
/login: Initiates the LinkedIn OAuth 2.0 flow. /auth/linkedin/callback: Handles the LinkedIn OAuth 2.0 callback and retrieves access tokens. /profile: Displays the user's LinkedIn profile information. /post: Provides a form to create and post content to LinkedIn.
The profile endpoint (/profile) returns JSON data in the following format:
{
"sub": "782bbtaQ",
"name": "John Doe",
"given_name": "John",
"family_name": "Doe",
"picture": "https://media.licdn-ei.com/dms/image/C5F03AQHqK8v7tB1HCQ/profile-displayphoto-shrink_100_100/0/",
"locale": "en-US",
"email": "doe@email.com",
"email_verified": true
}Configured Linkedin API to -Allow user to login with Linkedin -Authorize Linkedin to fetch user profile -Allow user to post to Linkedin
This project demonstrates how to integrate Reddit authentication and retrieve user information using a Flask application.
This application allows users to authenticate via Reddit OAuth 2.0, retrieve their profile information, and perform actions such as fetching their profile details and recent posts from Reddit.
Before getting started, ensure you have the following:
- Reddit Developer Account: Register your application on Reddit Developer Portal to obtain
CLIENT_IDandCLIENT_SECRET.
-
Reddit App Credentials:
- Obtain
CLIENT_IDandCLIENT_SECRETfrom Reddit Developer Portal. - Set
REDDIT_REDIRECT_URIto match the callback URL configured in your Reddit app.
- Obtain
-
Scopes:
- Define the scopes required for the application. Example:
['identity', 'read', 'history'].
- Define the scopes required for the application. Example:
Click on the "Login with Reddit" button.
- /login/reddit: Initiates the Reddit OAuth 2.0 flow.
- /auth/reddit/callback: Handles the Reddit OAuth 2.0 callback and retrieves access tokens.
- /reddit_profile: Displays the user's Reddit profile information.
- /reddit_posts: Fetches the user's recent posts from Reddit.
This project demonstrates how to integrate Youtube authentication and retrieve user information via Youtube Data API
This application allows users to authenticate via Youtube Data API OAuth 2.0, retrieve their profile information, and perform actions such as fetching their profile details and videos from Youtube.
Before getting started, ensure you have the following:
- Enable Youtube Data API via the Google developer console: Register your application onthe console to obtain
CLIENT_IDandCLIENT_SECRET.
-
Youtube App Credentials:
- Obtain
CLIENT_IDandCLIENT_SECRET. - Set
YOUTUBE_REDIRECT_URIto match the callback URL configured in your Youtube app.
- Obtain
-
Scopes:
- Define all the scopes available in the app , and define the scopes you want in the code: YOUTUBE_SCOPES = [ 'https://www.googleapis.com/auth/youtube.readonly', 'https://www.googleapis.com/auth/youtube.force-ssl', 'https://www.googleapis.com/auth/youtube' ]
Click on the "Login with Youtube" button.
This is youtube channel profile: 
And these are outputs after configuring :



