Conversation
|
will add email based authentication once yall think its okay. Also needa change header for mobile layout following env variables are required (don't kill me pls) |
| <a | ||
| className="self-center font-semibold text-indigo-600 hover:text-white" | ||
| href="/profile" | ||
| >{`Hello ${session?.user.name}!`}</a> |
There was a problem hiding this comment.
May be better to display the avatar instead of the text here
| }, | ||
| callbacks: { | ||
| async redirect({ baseUrl }) { | ||
| // Redirect users to the /profile route after login |
There was a problem hiding this comment.
Current rerouting is done to base directory not profile
There was a problem hiding this comment.
Oops ya, forgot to change the comment but I decided to route to / instead of /profile because in the event that user log out, the same callback url will be used and it will be weird for users to be routed to /profile when they are not authenticated.
| <h1>Profile Page</h1> | ||
| <p>Welcome to your profile page!</p> | ||
| <div className="flex flex-col items-center justify-center p-6"> | ||
| <Avatar className="flex h-[100px] w-[100px] items-center justify-center overflow-auto rounded-full bg-gray-500"> |
|
Tested working functionality with gmail. Display of avatar and name all works well. However, we will probably need a our own db of users so that we can verify users are from rh (@chuahziyang confirm?). Thus. there may be a need to authenticate against our own db instead. |
/login route (prior to login)

/profile route (after authentication)
