Skip to content
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

Question about fos_auth_server.yaml #640

Open
softrare opened this issue Apr 20, 2020 · 0 comments
Open

Question about fos_auth_server.yaml #640

softrare opened this issue Apr 20, 2020 · 0 comments

Comments

@softrare
Copy link

softrare commented Apr 20, 2020

Hi! I have a web application referring a user to a separate identity provider application to log in through username/password which sends back an access token and the user gets logged in. The identity provider application has a "dummy" 2FA implementation which I would like to replace, e.g. with an extra Google Authenticator step using https://github.com/scheb/two-factor-bundle.

In my fos_auth_server.yaml, I have the usual lines reading

fos_oauth_server:
db_driver: orm # Drivers available: orm, mongodb, or propel
client_class: App\Entity\Oauth\Client
access_token_class: App\Entity\Oauth\AccessToken
refresh_token_class: App\Entity\Oauth\RefreshToken
auth_code_class: App\Entity\Oauth\AuthCode
service:
user_provider: fos_user.user_provider.username
options:
access_token_lifetime: 10800
supported_scopes: user

beneath that I have this

authorize:
    form:
        type:               App\Form\AuthorizationType
        handler:            App\Form\Handler\TwoFactorAuthorizationFormHandler
        name:               fos_oauth_server_authorize_form
        validation_groups:
            # Defaults:
            - Authorize
            - Default

the author of scheb/two-factor-bundle says I don't need this because on successful OAuth authentication I should be directly transferred to his 2FA form but if I remove this I get this error: https://ibb.co/8cFy3yS

Can anyone understand what causes this error? I am starting with Symfony and this is really something I have trouble with right now. Thanks a lot in advance for any efforts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants