Open YavorLalev opened 5 months ago
Hey Plotdata Team, your user story looks fantastic and is ready to go. One little remark: you are planning to manually setup your user db. There is already a drop in solution for that from next-auth. You need to search for the MongoDB Adapter in their docs. This might spare you some trouble later on.
Value proposition
As a user I want to have an account where I can sign in and sign out.
Description
Acceptance Criteria
Sign-in
-button leads back to the StartpageSign-in
-button changes toSign-out
-button and a text is displayed next to theSign-out
-button: "You are logged in as ...."Sign-out
-button signs the user out and redirects the user to the StartpageTasks
SignInForm
component:import { useSession, signIn, signOut } from "next-auth/react";
Sign in
button to theStartPage
componentpages/api/user/[id].js
and handle the needed methods