Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add redirectURL params in github/login route #937

Merged
merged 5 commits into from
Jul 26, 2023

Conversation

prakashchoudhary07
Copy link
Contributor

@prakashchoudhary07 prakashchoudhary07 commented Mar 3, 2023

/auth/github/login?redirectURL="any-realdevsquad-website"
Adds redirectURL query params, to redirect to the specified URL

Closes: #1213

image

const router = express.Router();
const auth = require("../controllers/auth");

router.get("/github/login", passport.authenticate("github", { scope: ["user:email"] }));
router.get("/github/login", auth.githubAuthLogin);

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.

router.get("/github/callback", auth.githubAuth);
router.get("/github/callback", auth.githubAuthCallback);

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
@prakashchoudhary07 prakashchoudhary07 force-pushed the add-new-controller-for-github-login branch from bce1502 to 35d168e Compare June 29, 2023 18:46
@shubham-y shubham-y changed the title Add redirectURL params in github/loign route Add redirectURL params in github/login route Jun 30, 2023
Copy link
Contributor

@RitikJaiswal75 RitikJaiswal75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the changes discussed in the call.

RitikJaiswal75
RitikJaiswal75 previously approved these changes Jun 30, 2023
sahsisunny
sahsisunny previously approved these changes Jun 30, 2023
controllers/auth.js Outdated Show resolved Hide resolved
controllers/auth.js Outdated Show resolved Hide resolved
@prakashchoudhary07 prakashchoudhary07 merged commit 5c00318 into develop Jul 26, 2023
@prakashchoudhary07 prakashchoudhary07 deleted the add-new-controller-for-github-login branch July 26, 2023 14:59
ankushdharkar pushed a commit that referenced this pull request Jul 27, 2023
* Added get route for fetching user device info

* Added validator for query params

* Fixed integration test

* Removed console log

* Updated integration test

* Added validator test

* Refactor controller functions to use service layer for retrieving user data (/users/userId/:userId) route (/users/self) route (#1249)

* removal of sensitive info(phone,email,tokens,chaincode) on /users route

* update in removal of sensitive info(phone,email,tokens,chaincode) on /users route

* Update dataAccessLayer.js

* updated query id and qualifiers params in /users in removal of sensitive info(phone,email,tokens,chaincode) on /users route

* updated dataAccessLayer for lint issues

* Update users.js

* updated delete statement to hasOwnProperty

* updated default arguments to function removeSensitiveInfo

* made updates in the dataAccessLayer

* Update users.js

* typo fixes

* Added unit tests

* updated to using in operator

* updated to query as argument in place of req

* updates to /user/userId

* added code changes for /self route

* remove extra lines

* Update users.js

* removed commented lines

* lint error fix

* Update users.js

---------

Co-authored-by: Sen, Sriza <[email protected]>

* Stop collecting github access token and remove it from existing user's data (#1227)

* wrote scripts and tests

* forgot to add this file

* fixing test errors

* implemented batch instead of promise.all to send update request to firestore

* fixed test and resolved comments

* fixed tests

* forgot to fix this

* forgot to fix this

* preventing object sink

* preventing object sink

* fixing function call object sink warning

* ignore object sink

* resolved comments by randhir

* resolved comments

* fixing tests

* refactor all occurrences of fetchUser,fetchUsers (#1293)

* refactor occurrences of fetchUser,fetchUsers

* added unit tests

* added lint fixes

* refactor remaining fetchUser in users controller

* added lint fix and test errors fix

* added lint fix and test errors fix

* added lint fix

* refactor username

* refactor for getDiscordUsers

* added refactor for members model queries

* added lint fix

* remove extra spaces

* added suggested change

* handled edge case

* added lint fix

* FEATURE: change `in_discord` role based on condition (#1324)

* FEATURE: true/false in_discord role based on recieve data from RDS and Discord

* TEST: fix failing test

* FEATURE: add userUpdatedWithInDiscordFalse in response

* REFACTOR: syncExternalAccountData condition

* REFACTOR: syncExternalAccountData function

* FIX: order of arguments in addOrUpdate function call

* Update controllers/external-accounts.js

Co-authored-by: Randhir Kumar Singh <[email protected]>

---------

Co-authored-by: Randhir Kumar Singh <[email protected]>

* Add redirectURL params in github/login route (#937)

* feat: add redirectURL params in github/loign route

* Fix tests

* chore:fix-test

* chore: add new test coverage

* fix endswith edgecase

---------

Co-authored-by: Satyam Negi <[email protected]>
Co-authored-by: Sriza Sen <[email protected]>
Co-authored-by: Sen, Sriza <[email protected]>
Co-authored-by: Fakhruddin KW <[email protected]>
Co-authored-by: Randhir Kumar Singh <[email protected]>
Co-authored-by: Prakash Choudhary <[email protected]>
@vvaibhavdesai vvaibhavdesai mentioned this pull request Jul 27, 2023
8 tasks
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.

Add redirectURL params in auth/github/loign route
4 participants