Skip to content

Commit

Permalink
2FA Return QR server as well
Browse files Browse the repository at this point in the history
  • Loading branch information
StorytellerCZ committed Mar 20, 2022
1 parent d885204 commit 1e46cc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/source/packages/accounts-2fa.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The first step, in order to enable 2FA, is to generate a QR code so that the use

{% apibox "Accounts.generate2faActivationQrCode" "module":"accounts-base" %}

Receives an `appName` which is the name of your app that will show up when the user scans the QR code. Also, a callback called with a QR code in SVG format on success or a single `Error` argument
on failure.
Receives an `appName` which is the name of your app that will show up when the user scans the QR code. Also, a callback called with a QR code in SVG format and QR secret on success
or a single `Error` argument on failure.

On success, this function will also add an object to the logged user's services object containing the QR secret:

Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-2fa/2fa-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Meteor.methods({
}
);

return svg;
return { svg, secret };
},
enableUser2fa(code) {
const user = Meteor.user();
Expand Down

0 comments on commit 1e46cc6

Please sign in to comment.