Skip to content

Commit

Permalink
Merge pull request #107 from userfront/dev-1085-totp-backup-codes
Browse files Browse the repository at this point in the history
Never redirect after login when setting up TOTP
  • Loading branch information
drbrady8800 authored Mar 11, 2024
2 parents 26ce764 + 49af0fd commit e367c09
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@userfront/toolkit",
"version": "1.0.7",
"version": "1.0.8-alpha.0",
"description": "Bindings and components for authentication with Userfront with React, Vue, other frameworks, and plain JS + HTML",
"type": "module",
"directories": {
Expand Down
5 changes: 3 additions & 2 deletions package/src/models/views/setUpTotp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ const setUpTotpConfig: AuthMachineConfig = {
} else if (hasValue(context.user.emailOrUsername)) {
arg.emailOrUsername = context.user.emailOrUsername;
}

arg.redirect = false;
}

// Don't redirect after TOTP setup so backup codes can be shown
arg.redirect = false;

return callUserfront({
// Should ALWAYS be Userfront.login here
method: "login",
Expand Down

0 comments on commit e367c09

Please sign in to comment.