Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
This commit is contained in:
3
backend/controllers/authController.js
Normal file → Executable file
3
backend/controllers/authController.js
Normal file → Executable file
@@ -63,7 +63,8 @@ class AuthController {
|
||||
async oauthStart(req, res) {
|
||||
const { provider } = req.params;
|
||||
try {
|
||||
const redirectTo = await oauthService.startOAuthLogin({ providerSlug: provider });
|
||||
const client = req.query.client === 'android' ? 'android' : 'web';
|
||||
const redirectTo = await oauthService.startOAuthLogin({ providerSlug: provider, client });
|
||||
res.redirect(302, redirectTo.toString());
|
||||
} catch (error) {
|
||||
const status = error.message === 'providernotconfigured' ? 503 : 500;
|
||||
|
||||
Reference in New Issue
Block a user