-
Notifications
You must be signed in to change notification settings - Fork 44.7k
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
refactor(frontend): Auth pages update #9124
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for auto-gpt-docs-dev canceled.
|
✅ Deploy Preview for auto-gpt-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
||
if (error) { | ||
console.error("Error signing up", error); | ||
// FIXME: supabase doesn't return the correct error message for this case |
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.
I couldn't make supabase return actual error on database trigger, it returns unexpected_failure
instead, so any error triggers waitlist prompt in signup/page.tsx
.
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.
Shouldn't we propagate the error either way or say something like "Internal/unknown error" ?
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.
I tried fixing it but couldn't, supabase returns a generic database error instead of the custom one from the function (set in the supabase dashboard). This is just to show waitlist information (see screenshot).
}, | ||
}); | ||
|
||
// const onProviderLogin = useCallback(async ( |
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.
Remove this?
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.
This is valid code that should be uncommented when we enable social login, I added a TODO
.
{/* <div className="mb-6 space-y-2"> | ||
<AuthCard> | ||
<AuthHeader>Login to your account</AuthHeader> | ||
{/* <div className="mb-6 space-y-2"> |
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.
Ditto
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.
I removed this since it's most likely going to look different anyway.
const headersList = headers(); | ||
const host = headersList.get("host"); | ||
const protocol = | ||
process.env.NODE_ENV === "development" ? "http" : "https"; |
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.
Don't we have a constant value for this ?
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.
We do on the backend, I don't see anything on the frontend but let me know if you have any idea.
|
||
if (error) { | ||
console.error("Error signing up", error); | ||
// FIXME: supabase doesn't return the correct error message for this case |
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.
Shouldn't we propagate the error either way or say something like "Internal/unknown error" ?
There are UX and design issues with current auth pages;
login
,signup
andreset_password
(including change password).Changes 🏗️
*Missing
s
on the login's password error is fixed.Important changes in bold.
All auth pages
/login
into/signup
StringPassword must be...")Sentry.withServerActionInstrumentation
PasswordInput
"eye button" shows password only when mouse button is hold and doesn't capture tabLogin page
actions.ts
Signup page
Reset password page
actions.ts
Other
types/auth
components/PasswordInput.tsx
to/components/auth
components/auth
yarn.lock
(supabase packages)client.ts
useSupabase
; user is simply not logged inChecklist 📋
For code changes:
/reset_password
Note: OAuth login providers are disabled and so untested.
Example test plan
For configuration changes:
.env.example
is updated or already compatible with my changesdocker-compose.yml
is updated or already compatible with my changesExamples of configuration changes