Comments (11)
wantsToAddDevice() returns false. I'm using the default view that comes with the package for the 2FA challenge.
wantsToAddDevice() checks for $this->request->filled('safe_device'), which is not in the request, since the view does not contain that field in the form.
Maybe this is just a documentation issue. I guess this only works when creating a custom view that uses a safe_device field.
from twofactor.
Indeed, wantsToAddDevice()
checks if the request contains safe_device
and is not empty.
It could be added to the view if the safe_devices
config is true
, and hide it when it's disabled. Since I'm hands full right now, not on top of my list, but you're welcome to make a PR.
from twofactor.
@DarkGhostHunter i have exactly the same issue, how could i turn it on? i have added safe_device as a checkbox and is showing as on
when i click on checkbox however it still shows safe_devices
as a null
, may be i am doing something wrong.
from twofactor.
from twofactor.
@DarkGhostHunter could you please elaborate this?
from twofactor.
Publish the view and edit the form.
from twofactor.
i already publish the view called confirm.blade.php
, i have edit the form
<input id="safe_device" type="checkbox" class="border border-gray-300 name="safe_device" />
<label for="safe_device"> I trust this device. Don't ask for codes for 14 days. </label>
but nothing happened, it doesn't store the safe_devices
data.
from twofactor.
@DarkGhostHunter checking to see if you have any update on this? thank you.
from twofactor.
@DarkGhostHunter checking to see if you have any update on this? thank you.
Hands full. PR welcomed.
from twofactor.
Here is the correct code you need to use:
<input id="safe_device" type="checkbox" value="1" class="border border-gray-300" name="safe_device" />
<label for="safe_device"> I trust this device. Don't ask for codes for 14 days. </label>
You were missing the value and the class attribute was not closed.
from twofactor.
@AlexisSerneels i try this and it doesn't work, i am sure there's some issue with the code, i haven't check the package code yet, is it working with you?
from twofactor.
Related Issues (20)
- Call Auth2FA::attempt gives warning 'Non static method 'attempt' should not be called statically.' HOT 8
- Determine if user bypassed 2 factor with safe device. HOT 2
- How to get the secret? HOT 4
- [1.2] Support Laravel 10 HOT 2
- Laravel 10 non-compatible examples HOT 1
- [1.x] Add Universal 2nd Factor (U2F) HOT 3
- Issue with migrating from darkghosthunter/laraguard HOT 2
- Support to return a custom route instead of custom view to handle the 2FA Code retry. HOT 3
- Issuer missing or double HOT 9
- [1.0] Multiple inputs for 2fa code HOT 7
- [1.x] cannot use user.uuid because of TwoFactorAuthentication model casting authenticatable_id to "int"
- [1.x] How to use with Laravel Breeze HOT 4
- The MAC is invalid. HOT 2
- Clarification Required HOT 1
- [1.2,2] Label is not displayed correctly on Apple devices due to urlencoding HOT 1
- hasTwoFactorEnabled function not work because enabled_at still null HOT 1
- [2.x] Clear Documentation Issues & UX Issues. HOT 2
- [2.0] Migration error
- [2.0] Include `SerializesModels` in events. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twofactor.