Skip to content

Commit

Permalink
Put missing code back
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Aug 11, 2022
1 parent 4d60bfd commit dd357e6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/plugins/users-permissions/server/controllers/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd357e6

Please sign in to comment.