Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Oct 30, 2024

Conversation

addegbenga
Copy link
Contributor

@addegbenga addegbenga commented Oct 29, 2024

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

if (!userAddress) {
return reply.code(400).send({ message: "User address is required" });
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to verify the signature in the Backend at this moment.

Please also add a TYPE="STARKNET" for Starknet signature verification.

apps/data-backend/src/routes/auth/index.ts Show resolved Hide resolved
updatedAt DateTime @updatedAt

@@map("users")
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe need to create a table for Session for user.

@MSghais MSghais merged commit fcd3850 into AFK-AlignedFamKernel:main Oct 30, 2024
0 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants