Blueauth (Live demo: https://blanka.lol/validation/bsky.php)
This is a custom authentication system designed for Bluesky, a social media platform, allowing users to verify their ownership of an account. The system generates a unique random string for each user, which they must post on their Bluesky account for validation.
Please install socialweb/atproto composer package.
composer require socialweb/atproto
-
Frontend:
- HTML, CSS (Bootstrap), and JavaScript are used for the user interface.
- Users input their Bluesky handle and are guided through the verification process.
- Feedback alerts provide information on the verification status.
-
Backend:
bsky-api-string.php
: Generates a random string associated with the user's Bluesky handle.bsky-api-auth.php
: Validates the ownership of the account by comparing the posted string with the generated one.bsky-local-api.php
: Grabs the latest feed post.
- Input Bluesky Handle: Users enter their Bluesky handle in the provided field.
- Generate Random String: Upon submission, a unique random string is generated and displayed.
- Post on Bluesky: Users post the generated string on their Bluesky account for verification.
- Validation: The system validates the ownership based on the posted string.
- Feedback: Users receive immediate feedback on the validation status through alerts.
- HTML, CSS (Bootstrap), JavaScript for frontend development.
- PHP for backend handling of string generation and authentication.
- cURL for making requests to Bluesky API.
- Backend Integration: Ensure proper integration and configuration of the backend scripts (
bsky-api-string.php
andbsky-api-auth.php
) for the system to function correctly. - Security: Implement security measures, such as input validation and sanitization, to prevent vulnerabilities like SQL injection and cross-site scripting (XSS).
- Testing: Thoroughly test the system in various scenarios to ensure reliability and security.
This system provides a basic framework for Bluesky authentication and can be extended and customized according to specific requirements and security considerations.
Built with love by Blanka in Poland 💜