Authentication with Instagram in a Laravel API using Socialite

Job ID: 37332246

Budget: $10 – $30 USD

Requirements:

1. Project Initialization:
- Set up a new Laravel project from scratch.
- Install and configure the Laravel Socialite package.
- Designate the project as an API (no web front-end is required).

2. API Endpoints:

a. Authentication Initiation:
- Endpoint: `GET /auth/instagram`
- It should redirect the user to the Instagram authentication flow.

b. Authentication Callback:
- Endpoint: `GET /auth/instagram/callback`
- It will handle Instagram's response post-authentication.
- Should return a JSON detailing the authentication status (success or failure), and upon success, relevant user data or a token.

3. Documentation:
- Provide clear and concise instructions on how to replicate and integrate this API into another Laravel project. Include configuration details, migrations, code changes, etc.

Additional Notes:
- The API will be consumed by a mobile application, so it's crucial that the endpoints respond appropriately for such a purpose.
- Security is paramount, especially when managing tokens and sensitive data. Consider standard security practices for APIs.
- The API doesn't need to have a web front-end; it will be interacted with through HTTP requests.

Deliverables:
- Laravel project with the Instagram authentication API in place.
- Documentation on how to implement and use the API in another Laravel project.
- Postman tests or a demonstration of the API's functionality.
Related categories: PHP Laravel Instagram API