-
Notifications
You must be signed in to change notification settings - Fork 182
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
is there any stp-by-step doc? #189
Comments
Hi. The package provides a middleware that you can add to the routes you want to enforce for the 2fa. You have to provide to the package a view to ask for the code and update its name in the config file, google2fa.php. It is up to you to create the way for the user to activate the 2fa. You will need to add a column at the users table to store the secret. This column’s name should be added to the config file mentioned before. |
I added the middleware to all protected routes. and the view for asking the OTP. But how can I intercept that user has not initialized it's authenticator app with the qr? Because actually the app after the login is requiring the otp, but not showing the qr but if the google2fa_secret is NULL, the middleware go on without asking for 2FA at all. This parte is undocumented, please, give me a direction. |
That’s true. What you could do is to add a second column that tells whether the user has activated it or not and update the middleware to redirect for a view that shows the qrcode to scan in case it has not been activated. |
ok, I understand. I did it. Now ... I cannot understand if your package includes OR NOT a qr code generator. Could you give me a simple example ?
|
Ok, found !!! Installed the QR code package 'chillerlan/php-qrcode' in addition
In the user class
in the blade
|
I appreciate your work a lot
But we cannot understand what to do after installation.
Aren't there any migration to run'
How to create routes? and how to intercept login to force redirect to view ?
Is there any public repo with a working laravel repo where is already integrated your package?
The text was updated successfully, but these errors were encountered: