You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I authenticate the token filled in by the user like this, where params[:otp_token] is the user filled token from the view:
result = current_user.authenticate_otp(params[:otp_token], drift: 300)
I noticed when params[:otp_token] is an empty string, that the result is true, which should be false?
In my opinion any empty or nil value should always result in a false result?
The text was updated successfully, but these errors were encountered:
I authenticate the token filled in by the user like this, where
params[:otp_token]
is the user filled token from the view:I noticed when
params[:otp_token]
is an empty string, that the result istrue
, which should befalse
?In my opinion any empty or nil value should always result in a
false
result?The text was updated successfully, but these errors were encountered: