Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never redirect after login when setting up TOTP #107

Merged
merged 2 commits into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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": {
5 changes: 3 additions & 2 deletions package/src/models/views/setUpTotp.ts
Original file line number Diff line number Diff line change
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to explicitly redirect after they confirm they've gotten the codes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It redirects to the after signup path after you hit continue.


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