Merge pull request #14072 from strapi/fix/lost-code-merge

Put missing code back
This commit is contained in:
Alexandre BODIN 2022-08-11 10:15:31 +02:00 committed by GitHub
commit b0da408fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,6 +91,18 @@ module.exports = {
user: await sanitizeUser(user, ctx),
});
}
// Connect the user with the third-party provider.
try {
const user = await getService('providers').connect(provider, ctx.query);
return ctx.send({
jwt: getService('jwt').issue({ id: user.id }),
user: await sanitizeUser(user, ctx),
});
} catch (error) {
throw new ApplicationError(error.message);
}
},
async changePassword(ctx) {