Software engineer and technology nerd.
Here are some of my recent blog posts:
An example of how to implemented OTP two-factor authentication as a second login step in Rails and Devise
Software engineer and technology nerd.
Here are some of my recent blog posts:
I have an issue where the user is presented with the flash message "Error: You're already signed in!" (which comes from devise) when completing a successful OTP entry while redirecting them to their account "dashboard". It isn't really the right user feedback in this instance and could catch some people off guard if they were paying attention...so after a bit of thumbing around with what the event: :authentication
method does in the authenticate_with_otp_two_factor.rb controller concern, I was able to update this line:
sign_in(user, event: :authentication)
to this sign_in_and_redirect(user, event: :authentication)
to make the flash message disappear entirely. However, it would be better to have it flash another more appropriate message, but I was unable to find the right spot to do so! Any hints as to where a new flash message could go on a successful sign in?
backup codes are generated and displayed but not saved to the db.
i have used postgres instead of sqlite while following your blog post step by step.
Rails 6.1.4.1
devise (4.8.0)
bcrypt (> 3.0)> 0.1)
orm_adapter (
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-two-factor (4.0.1)
activesupport (< 6.2)
attr_encrypted (>= 1.3, < 4, != 2)
devise (> 4.0)> 6.0)
railties (< 6.2)
rotp (
I was wondering how you'd go about implementing trusting the browser for 30 days with this devise-two-factor. Have you had any experience with doing this?
On app/views/two_factor_settings/new.html.erb
, entering the code manually instead of scanning the QR code doesn't seem to work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.