GoogleAuthenticator | use server-side two-factor authentication library | Authentication library
kandi X-RAY | GoogleAuthenticator Summary
kandi X-RAY | GoogleAuthenticator Summary
Simple, easy to use server-side two-factor authentication library for .NET that works with Google Authenticator.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GoogleAuthenticator
GoogleAuthenticator Key Features
GoogleAuthenticator Examples and Code Snippets
Community Discussions
Trending Discussions on GoogleAuthenticator
QUESTION
I'm trying to configure communication with Google OAuth 2.0 in my Qt project. I was using this tutorial, although it seems to be a bit outdated. I configured everything in Google APIs site, used those data in Credentials/OAuth 2.0 Client IDs
page:
Header file:
...ANSWER
Answered 2020-Aug-08 at 04:05I have tested the example and strangely it does not work for the "email" scope, after analyzing the http request I found that the problem is the encoding of the "code" received and that it is used to obtain the token. So my solution is to correct that parameter and that can be done override the requestAccessToken()
method or use setModifyParametersFunction()
, in this case use the latter:
QUESTION
I have a CakePHP application running on Cake PHP 3.8.13, CakeDC Users 8.5.1 and PHP 7.4. I am attempting to use a custom controller so that I can adjust the behaviour of the LoginTrait and PasswordChangeTrait.
I have been following the documentation in https://github.com/CakeDC/users/blob/master/Docs/Documentation/Configuration.md#using-the-users-email-to-login
However my custom UsersController is not being used.
I have added the following lines to /config/bootstrap.php
...ANSWER
Answered 2020-Oct-12 at 07:59It appears that customising the controller does not overwrite the current route it only overwrites based on the custom controller name, i.e. instead of /login it is /myusers/login
QUESTION
I have a CakePHP application running on Cake PHP 3.8.13 and CakeDC Users 8.5.1.
I am currently able to log on using the username field, but I would like to use the email field for authentication. I have followed the instructions on https://github.com/CakeDC/users/blob/master/Docs/Documentation/Configuration.md#using-the-users-email-to-login but the system is still trying to use the username field. If I change email to username in the src/Template/Plugin/CakeDC/Users/Users/login.ctp I can log in using the username.
How can I get it to use the email field instead?
src/Application.php
...ANSWER
Answered 2020-Oct-06 at 15:13Add this code
QUESTION
On login page I get this in dev.log:
Guard authenticator does not support the request. {"firewall_key":"main","authenticator":"App\Security\LoginFormAuthenticator"} []
Plus on the register page, after submitting I get
The CSRF token is invalid. Please try to resubmit the form.
And in dev.log:
Guard authentication failed. {"exception":"[object] (Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException(code: 0):
The same code is working on my colleague's machine cannot get where can be the problem.
security.yaml
...ANSWER
Answered 2020-May-07 at 04:44The solution was to set the path for the session even though the log complained about other things:
QUESTION
I need to install https://github.com/PHPGangsta/GoogleAuthenticator but if I run composer require "PHPGangsta/GoogleAuthenticator:1.0.1" I get an error:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - The requested package phpgangsta/googleauthenticator 1.0.1 exists as phpgangsta/googleauthenticator[dev-master] but these are rejected by your constraint.
Here is composer.json where is only restriction for PHP version.
...ANSWER
Answered 2019-Oct-04 at 12:46I think there is not available the 1.0.1
version from the package.
When you run the composer show --available phpgangsta/googleauthenticator
command then you can see there the possible versions but there is only the dev-master
.
And this version is not a stable version. Composer wants to install only stable versions from packages defaultly, but there is not.
So if you want to use this in your project then need to install with composer require --prefer-dist phpgangsta/googleauthenticator:dev-master
command.
QUESTION
I'm trying to implement TOTP on 8086 assembly. The procedures that return unix time/30 and HMAC-SHA1 are working perfectly(checked). I'm using the key "0000000000" which is equal to 0x30303030303030303030(GAYDAMBQGAYDAMBQ in base32) and I'm getting different results than the Google Authenticator app. This is my code:
...ANSWER
Answered 2019-Apr-29 at 13:32I've found the problem. The messsage should be 8 bytes long. This is the working code:
QUESTION
I am implementing two factor authentication using passportjs module [passport-2fa-totp][1]http://www.passportjs.org/packages/passport-2fa-totp/
I am able to successfully register user and store its key.
I am not able to verify totp-code generated by google authenticator app I am using the following code as reference,
`passport.use(new TwoFAStartegy(function (username, password, done) {
...ANSWER
Answered 2019-Feb-27 at 14:25Please check that you are getting username
, password
and code
in these exact fields only and not in any other field, because passport-2fa-totp
assumes that you are getting in these fields only.
code
field will be passed to the second callback of TwoFAStartegy
and verify
fn will verify the the code.
Maybe, you can get additional info if you do this,
QUESTION
When I choose my email acount to log with google API, I have systematically a "invalid_grant" error. After debugging the GuardAuthenticator, everything's fine until retrieving user (it retrieves !) but when I return the user, I fall in onAuthenticationFailure with "invalid _grant" error.
I'm working with Symfony 4.1 and Doctrine ODM :
Here my code :
knpu_oauth2_client.yaml :
...ANSWER
Answered 2019-Feb-18 at 19:08You need to set the access_type field in your knpu_oauth2_client.yaml
QUESTION
So i'm having a problem with google authenticator and my PHP.
So i'm using this library to generate QR codes: https://github.com/PHPGangsta/GoogleAuthenticator
So when I use my username to generate a code it works fine. I get something along the lines of: otpauth://totp/username?secret=aCodeInBase32&issuer=Mysite
For my case it is: otpauth://totp/NoahNok?secret=aCodeInBase32&issuer=JukeHost
however when doing this for any other use I get an invalid token error on the Google Authenticator app. It doesnt matter what else I put I always seem to get this error, yet it works fine for my account.
E.g this one doesn't work: otpauth://totp/Test?secret=KRSX&issuer=JukeHost
Is there something obvious im doing wrong?
Code im using: Some queries before to get data
...ANSWER
Answered 2018-Aug-23 at 23:18Base32 is padded out to the nearest multiple of 8 characters, so it won't always have ====
at the end to strip off. From your examples we get:
QUESTION
I did a fresh installation. CakePHP 3.6 and CakeDC/Users everything following the docs. I have created custom UsersController.php with the traits for users administration under the admin prefix and after logged in with superuser (created from command line) I managed to create new user with "admin" role. Then logged out and logged in with the new user and browser shows "The page isn’t redirecting properly" error. Social login is disable.
/src/Config/bootstrap.php
...ANSWER
Answered 2018-May-24 at 11:14Check debug.log when debug is true to understand the rules evaluation and debug the issue. It looks like the logged in user (debug the user data from $this->Auth->user()
role is not matching your defined rules.
Also check the correct key for defining permissions is CakeDC/Auth.permissions
see https://github.com/CakeDC/users/blob/master/config/permissions.php#L53
I would modify the rule
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GoogleAuthenticator
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page