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

Not getting a simple sign-in page right #6656

Open
1 task done
wjmaritz opened this issue Feb 20, 2025 · 0 comments
Open
1 task done

Not getting a simple sign-in page right #6656

wjmaritz opened this issue Feb 20, 2025 · 0 comments

Comments

@wjmaritz
Copy link

Describe the bug

Trying to build a Saas platform. Bolt.new is not even getting the first sign-in page right. When signing in it just gets stuck on the page. When asking it to fix the error, it seems to be doing something but comes up with the same issue over and over again. Here's the status:

Me: again stuck on the Signing in status

Bolt: I notice the issue in the authentication flow. The main problem is that we're not properly handling the user state after sign-in. Let's fix this by updating the AuthContext and Login page.

Fix authentication flow

src/contexts/AuthContext.tsx
src/pages/Login.tsx
Key changes made:

In AuthContext:

Fixed the signIn function to properly wait for and handle the session
Added proper state management after sign-in
Improved error handling
In Login page:

Added automatic redirect when user is authenticated
Removed manual navigation after sign-in (now handled by useEffect)
Improved loading state UI
Better error handling
Try signing in again with:

Email: [email protected]
Password: xxxxx
The sign-in process should now work correctly without getting stuck in the loading state. Let me know if you need any adjustments.

Link to the Bolt URL that caused the error

https://bolt.new/~/sb1-ze1rwk9z

Validations

  • Please make your project public or accessible by URL. This will allow anyone trying to help you to easily reproduce the issue and provide assistance.

Steps to reproduce

Try to activate a simple sign in page

Expected behavior

user should be able to sign in

Screen Recording / Screenshot

No response

Platform

Browser name = Chrome
Full version = 133.0.0.0
Major version = 133
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 198236298,
  "usedJSHeapSize": 178367478,
  "jsHeapSizeLimit": 2248146944
}
Username = wmaritz
Chat ID = fc728ffc78c7
Client version = 6c0f11b
Server version = 6c0f11b

Additional context

No response

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

No branches or pull requests

1 participant