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
Store OAuth Flow State Object in Cookies: Implement the todo that suggests storing the OAuth flow state object to cookies. This stored state should be compared with the state param returned from the GitHub OAuth flow in the github/oauth/callback handler to prevent CSRF attacks.
Implement Signout/Disconnect Feature: Create a helper function that can be exported from the doAuth action to handles signout/disconnect functionality. This function should:
Clear the token data saved in the cookie for jargons.dev:token.
Redirect the user to the homepage of the web app.
Related Files
github/oauth/callback.js
lib/actions/do-auth.js
Acceptance Criteria
OAuth flow state object is stored in cookies and compared with the state param.
Signout/disconnect feature is implemented and accessible through the doAuth action
Additional Notes
Nothing much... just ask a question or share ideas, if you've got any 😉
The text was updated successfully, but these errors were encountered:
Fixesjargonsdev#30
Implement the OAuth flow state object storage in cookies and the signout/disconnect feature.
* Store the OAuth flow state object in cookies in `src/lib/actions/do-auth.js` and compare it with the `state` param in the `doAuth` function.
* Retrieve the stored state from cookies in `src/pages/api/github/oauth/callback.js`, compare it with the `state` param, and delete the stored state from cookies after comparison.
* Update the signout/disconnect link in `src/components/islands/profile.jsx` to point to the new signout route.
* Update the signout logic in `src/pages/logout.astro` to use the new signout function from `doAuth`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/jargonsdev/jargons.dev/issues/30?shareId=XXXX-XXXX-XXXX-XXXX).
The third iteration of the auth feature should focus on enhancing the OAuth flow and adding a signout/disconnect feature.
This is a follow up to the initial iterations...
Tasks
Store OAuth Flow State Object in Cookies: Implement the todo that suggests storing the OAuth flow state object to cookies. This stored state should be compared with the
state
param returned from the GitHub OAuth flow in thegithub/oauth/callback
handler to prevent CSRF attacks.Implement Signout/Disconnect Feature: Create a helper function that can be exported from the
doAuth
action to handles signout/disconnect functionality. This function should:jargons.dev:token
.Related Files
github/oauth/callback.js
lib/actions/do-auth.js
Acceptance Criteria
state
param.doAuth
actionAdditional Notes
The text was updated successfully, but these errors were encountered: