Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit e367c09

Browse files
authored
Merge pull request #107 from userfront/dev-1085-totp-backup-codes
Never redirect after login when setting up TOTP
2 parents 26ce764 + 49af0fd commit e367c09

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@userfront/toolkit",
3-
"version": "1.0.7",
3+
"version": "1.0.8-alpha.0",
44
"description": "Bindings and components for authentication with Userfront with React, Vue, other frameworks, and plain JS + HTML",
55
"type": "module",
66
"directories": {

package/src/models/views/setUpTotp.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ const setUpTotpConfig: AuthMachineConfig = {
6868
} else if (hasValue(context.user.emailOrUsername)) {
6969
arg.emailOrUsername = context.user.emailOrUsername;
7070
}
71-
72-
arg.redirect = false;
7371
}
7472

73+
// Don't redirect after TOTP setup so backup codes can be shown
74+
arg.redirect = false;
75+
7576
return callUserfront({
7677
// Should ALWAYS be Userfront.login here
7778
method: "login",

0 commit comments

Comments
 (0)