You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.
As a user
I want to be able to login to the Reuse app via Github e.g.
In order to do that functions like the isFavorite-function should be exclusive to me as a logged in user
Acceptance Criteria
A user login to the Reuse app via Github is possible
After successful login, the user is getting redirected to the landing page
Inside the header:
A login button is visible and turns into a logout button when the user is logged in
A text next to the login button is showing "Signed in as Username" or "Not logged in"
Tasks
Install NextAuth via npm
Create a OAuth-app in Github
Set the callback url in the OAuth-app
Save the client id and secret id from the OAuth-app in the .env.local.-file
Create a file "[...nextauth].js" under the route "/api/auth/[...nextauth].js" and add the NextAuth config to it
Wrap the SessionProvider around the pages/_app.jsx
The hooks useSession, signIn and signOut from NextAuth are implemented in the AuthButton component
The session can be accessed via "const { data: session } = useSession()"
Implement a login button and "Signed in as Username"/"Not signed in" text in the header
The text was updated successfully, but these errors were encountered:
kevinldg
changed the title
US15 - Login
US15 - Authentication (Called "Login" before)
Jan 23, 2024
kevinldg
changed the title
US15 - Authentication (Called "Login" before)
US15 - Authentication (Login)
Jan 23, 2024
Value Proposition
As a user
I want to be able to login to the Reuse app via Github e.g.
In order to do that functions like the isFavorite-function should be exclusive to me as a logged in user
Acceptance Criteria
Inside the header:
Tasks
The text was updated successfully, but these errors were encountered: