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

fix: Fixes #22 and #27 by adding custom signin page and show password with shadcn #42

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

shreyas0924
Copy link
Contributor

@shreyas0924 shreyas0924 commented Feb 2, 2024

Fixes #22 and #27

  1. Added custom login page by adding /sigin route and add the same in next-auth pages (auth.ts file)
  2. Show and hide password
custom.login.mp4

Copy link

vercel bot commented Feb 2, 2024

@shreyas0924 is attempting to deploy a commit to the My Team Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@siinghd siinghd left a comment

Choose a reason for hiding this comment

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

Add an alert to notify the user about the error

redirect: false,
});

if (!res?.error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it would be also better to add an alert or something to notify the user about the error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll do it now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added Sonner toast..

image

Copy link
Collaborator

@siinghd siinghd left a comment

Choose a reason for hiding this comment

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

Change static message to dynamic

@@ -26,6 +28,13 @@ const Signin = () => {

if (!res?.error) {
router.push('/');
} else {
toast('Error Signing in', {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't this error be more specific? res?.error probably. Might be good to display the returned error insted of static message.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah should address this in a follow up, merging for now as a v1

@hkirat hkirat merged commit 116bd23 into code100x:main Feb 2, 2024
1 check failed
@shreyas0924 shreyas0924 deleted the signin branch February 3, 2024 03:14
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants