feat: Add another parameter in OAuthLoginManager to seperate between redirecting routes for login and logout

Open Beginner friendly
#451 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
flask, python

Research direction

Start in flask_campus/login_manager.py by locating OAuthLoginManager and the blueprint code that uses its default_endpoint. Separate the login and logout redirect parameters, then verify that each flow redirects to its corresponding endpoint.

Written by the indexing model from the issue text.

Description

enhancement for-collaborators for-contributors

The current OAuthLoginManager takes in a "default_endpoint" parameter at the current moment, which is used to redirect users who have logged in AND logged out simultaneously. This might cause problems if I wanted users to go to a dashboard page when signed in, and landing page when signed out.

Task

  • Refactor OAuthLoginManager such that:
    • It accepts TWO, rather than ONE parameter, one for the endpoint to redirect after login and one to redirect after logout
    • Refactor the blueprint to redirect via these parameters

Files

Dominant language
Python
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nyjc-computing/campus

All issues in nyjc-computing/campus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.