Skip to content

GitHub authentication#29

Merged
Fis-ayo merged 5 commits into
mainfrom
github-authentication
Apr 14, 2026
Merged

GitHub authentication#29
Fis-ayo merged 5 commits into
mainfrom
github-authentication

Conversation

@Fis-ayo
Copy link
Copy Markdown
Collaborator

@Fis-ayo Fis-ayo commented Apr 14, 2026

Summary

Updated server flow to verify login through GitHub OAuth 2.0 is functional. When login in authenticated via GitHub, it redirects to the home page.

Test Verification Flow

  • Start server and confirm it is working
  • Create a GET request http://localhost:3001/auth/login/success without cookies using Postman or Insomnia
    • Expected result: 401 with not authenticated message
  • In a browser, open http://localhost:3001/auth/github and complete GitHub login.
  • In browser devtools, copy the connect.sid cookie for localhost:3001.
    • Steps to Copy connect.sid (Chrome/Edge):
    • Navigate to http://localhost:3001 in your browser.
    • Open DevTools: (right-click anywhere and select Inspect)
    • .Go to the Application tab in the top menu.
    • In the left sidebar, expand Storage > Cookies.
    • Select http://localhost:3001.
    • Locate connect.sid in the list, double-click the value, and press Ctrl+C (or Cmd+C) to copy it.
  • In Postman or Insomnia, call GET http://localhost:3001/auth/login/success with header:
    • Cookie: connect.sid=your_cookie_value
    • Expected result: 200 with success true and user object
  • In Postman, call GET http://localhost:3001/auth/logout with the same cookie.
    • Expected result: success true and logout status.
  • Call GET http://localhost:3001/auth/login/successagain with the same cookie.
    • Expected result: 401 (session is gone).

Test Artifacts

First check without session cookies

Screenshot 2026-04-13 at 12 56 50 PM

Login Authentication Via Github

Screen.Recording.2026-04-13.at.2.15.25.PM.mov

Login Okayed via Insomnia

Values are blurred out for security purposes
Screenshot 2026-04-13 at 2 56 27 PM

Notes for Testing

When testing for login ensure files are not changed in server or server does not restart. If not you would have to complete the login process again.

@Fis-ayo Fis-ayo linked an issue Apr 14, 2026 that may be closed by this pull request
21 tasks
@Fis-ayo Fis-ayo merged commit 4ba8acf into main Apr 14, 2026
@Fis-ayo Fis-ayo deleted the github-authentication branch April 14, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set Up Authentication Controller and Routes

2 participants