Skip to content

Commit 775a83f

Browse files
committed
refactor: change /auth/google -> /auth/login
1 parent 19970f8 commit 775a83f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

apps/client/src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
: 'https://api.motionflex.in';
77
88
function loginWithGoogle() {
9-
window.location.href = `${BASE_SERVER_URL}/auth/google`;
9+
window.location.href = `${BASE_SERVER_URL}/auth/login`;
1010
}
1111
</script>
1212

apps/server/src/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const config = {
1313
google: {
1414
clientID: process.env.GOOGLE_CLIENT_ID as string,
1515
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
16-
callbackURL: `${process.env.BASE_SERVER_URL}/auth/google/callback`,
16+
callbackURL: `${process.env.BASE_SERVER_URL}/auth/login/callback`,
1717
},
1818
cors: {
1919
origin: process.env.BASE_CLIENT_URL,

apps/server/src/routes/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import passport from 'passport';
44

55
const router = express.Router();
66

7-
router.get('/google', passport.authenticate('google', { scope: ['profile', 'email'] }));
7+
router.get('/login', passport.authenticate('google', { scope: ['profile', 'email'] }));
88

99
router.get(
10-
'/google/callback',
10+
'/login/callback',
1111
passport.authenticate('google', {
1212
failureRedirect: process.env.BASE_CLIENT_URL,
1313
}),

0 commit comments

Comments
 (0)