FIX: google-oauth redirect_uri fixed

This commit is contained in:
Gabriel Rosa
2022-06-27 16:13:58 -03:00
parent 74a6eb8132
commit b584c80e24
@@ -41,11 +41,9 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
}
authenticate(req, options) {
if (req.route.path.includes('callback')) {
return super.authenticate(req, options);
}
const plugin: string = req.route.path.replace('/oauth/', '');
const plugin: string = req.route.path
.replace('/oauth/', '')
.replace('/callback', '');
const { customer_id } = req.query;
options.scope = ['https://www.googleapis.com/auth/userinfo.email'];