-
Notifications
You must be signed in to change notification settings - Fork 141
Landing Page Integration for InPactAI #67
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
Changes from all commits
1150330
cc13afb
8308f57
88ed932
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,15 +9,13 @@ async def seed_db(): | |
| "id": "aabb1fd8-ba93-4e8c-976e-35e5c40b809c", | ||
| "username": "creator1", | ||
| "email": "[email protected]", | ||
| "password": "password123", | ||
| "role": "creator", | ||
| "bio": "Lifestyle and travel content creator", | ||
| }, | ||
| { | ||
| "id": "6dbfcdd5-795f-49c1-8f7a-a5538b8c6f6f", | ||
| "username": "brand1", | ||
| "email": "[email protected]", | ||
| "password": "password123", | ||
| "role": "brand", | ||
| "bio": "Sustainable fashion brand looking for influencers", | ||
| }, | ||
|
|
@@ -40,9 +38,6 @@ async def seed_db(): | |
| id=user_data["id"], | ||
| username=user_data["username"], | ||
| email=user_data["email"], | ||
| password_hash=user_data[ | ||
| "password" | ||
| ], # Using plain password directly | ||
| role=user_data["role"], | ||
| bio=user_data["bio"], | ||
| ) | ||
|
Comment on lines
38
to
43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adding a try-except block around the user creation and seeding process to catch any potential exceptions during database operations. This will improve the robustness of the seeding process. try:
user = User(
id=user_data["id"],
username=user_data["username"],
email=user_data["email"],
role=user_data["role"],
bio=user_data["bio"],
)
session.add(user)
print(f"Created user: {user_data['email']}")
except Exception as e:
print(f"Error creating user {user_data['email']}: {e}")
await session.rollback() # Rollback in case of error |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| class UserCreate(BaseModel): | ||
| username: str | ||
| email: str | ||
| password_hash: str | ||
| # password_hash: str # Removed: managed by Supabase Auth | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify consistent removal of password handling across the codebase. The architectural decision to delegate authentication to Supabase Auth is sound, and the implementation approach of commenting out the field with a clear explanation is good practice. However, ensure this breaking change is handled consistently across all related code. Run the following script to verify that password hash handling has been consistently removed: 🏁 Script executed: #!/bin/bash
# Description: Verify that password_hash references have been consistently removed or updated
# Expected: Should find no active password_hash usage in user creation/management code
echo "Checking for remaining password_hash references in active code:"
rg "password_hash" --type py -A 2 -B 2
echo -e "\nChecking user creation endpoints for password handling:"
rg -A 10 -B 5 "UserCreate|user.*create" Backend/app/routes/
echo -e "\nChecking database models for password fields:"
rg -A 5 -B 5 "password" Backend/app/models/
echo -e "\nChecking if Supabase Auth integration is properly implemented:"
rg -A 5 "supabase.*auth|auth.*supabase" Backend/app/Length of output: 2857 Let’s verify that the Supabase Auth client is actually being initialized and that any auth methods (e.g. sign-up/sign-in) are in use: 🏁 Script executed: #!/bin/bash
# Search for Supabase client initialization
echo "Locating Supabase client instantiation:"
rg -n "create_client" -A2 -B2 Backend/app/
echo -e "\nChecking for any supabase.auth API usage (sign_up, sign_in, user):"
rg -nE "supabase\.auth\.(sign_(up|in)|user)" -A2 -B2 Backend/app/Length of output: 999 Ensure Supabase Auth sign-up/sign-in is actually invoked While • Backend/app/routes/post.py – Supabase client is initialized at line 25 ( Please implement or verify that your user registration and login flows call the appropriate Supabase Auth methods instead of only performing DB inserts. 🤖 Prompt for AI Agents |
||
| role: str | ||
| profile_image: Optional[str] = None | ||
| bio: Optional[str] = None | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're removing the password, it might be worth adding a comment here explaining why these users don't have passwords. This will help future developers understand the context.