AFK-AlignedFamKernel / afk_monorepo

AFK: Aligned Fam Kernel - Monorepo
https://afk-community.xyz
MIT License
15 stars 42 forks source link

feat: added starkent signer and creation of user account on the backend #230

Closed addegbenga closed 3 weeks ago

addegbenga commented 3 weeks ago

PR Overview

This pull request enhances the application's functionality by introducing a new feature for verifying the connected account's digital signature. Here's a breakdown of the key changes:

  1. Signature Verification: The system now checks the validity of the user's digital signature. This ensures the authenticity of the connected account.

  2. Existing Account Handling: If the user already has an account, they are logged in seamlessly.

  3. New Account Creation: For users without an existing account, a new account is created, with the user's address stored in the userAddress field.

  4. Account Model Enhancements: The account model has been expanded to include additional fields, such as email and emailVerified. This lays the foundation for potential future enhancements, such as connecting user email addresses.

  5. StarkNet Login Flow: The implementation of the StarkNet login flow provides a secure and seamless user experience, including a signer screen for user interactions.

These changes improve the application's security, user experience, and flexibility for future developments.

NB: You account must be deployed before you can have a valid signature.

Screenshot 2024-10-29 at 17 09 14 Screenshot 2024-10-29 at 17 50 48 Screenshot 2024-10-29 at 17 50 53 Screenshot 2024-10-29 at 17 52 22