Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Problem with action /login_check on FOSBundle & FOSFacebookBundle #305

@davidwiniarz

Description

@davidwiniarz

Hello,

So here I have, my totally configured fos&face environment. I took step by step tutorial within these two bundles, checked hundred of times, ane nothing....

What is a problem? My fosBundle works great (have my own model class and my own facebook provider). The problem appears, when I try to login via facebook by clicking the famous blue button. I click, sth is opening, then close -> and error (in redirection).
that action /check_login is returning anything. I haven't done anything with that action (took step by step, like I said) and in config there is no word mentioning editing routing /check_login.

After all, facebookBundle doesn't work at all for me, because the lack of this action.

Can sb help me out?

Some config info:

fosbundle: ~2.0@dev
facebookbundle: dev-master

security.yml

security:
    encoders:
        FOS\UserBundle\Model\UserInterface: sha512

    role_hierarchy:
        ROLE_ADMIN:       ROLE_USER
        ROLE_SUPER_ADMIN: ROLE_ADMIN

    providers:
        chain_provider:
            chain:
              providers: [fos_userbundle, my_fos_facebook_provider]
        fos_userbundle:
            id: user_provider
        my_fos_facebook_provider:
            id: my.facebook.user   # see "Example Custom User Provider using the FOS\UserBundle" chapter further down

    firewalls:
        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_provider: form.csrf_provider
            logout:       true
            anonymous:    true
        public:
            pattern:   ^/.*
            fos_facebook:
                app_url: "http://www.facebook.com/apps/application.php?id=myAppId"
                server_url: "http://l.local/app_dev.php/"
                login_path: /login
                check_path: /login_check
                default_target_path: /
                provider: my_fos_facebook_provider
            anonymous: true
            logout: true
            #            redirect_to_facebook_login: false

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/, role: ROLE_ADMIN }
        - { path: ^/secured/.*, role: IS_AUTHENTICATED_FULLY }
        - { path: ^/facebook/,  role: [ROLE_FACEBOOK] }
        - { path: ^/.*, role: [IS_AUTHENTICATED_ANONYMOUSLY] }




config.yml


....

fos_user:
    db_driver: propel # other valid values are 'mongodb', 'couchdb' and 'propel'
    firewall_name: main
    user_class: Back\UserBundle\Model\User

fos_facebook:
    alias:  <name>
    app_id: <myNumber>
    secret: <myNumber>
    cookie: true
    permissions: [email]


routing.yml

fos_facebook_channel:
    resource: "@FOSFacebookBundle/Resources/config/routing.xml"

fos_user_security:
    resource: "@FOSUserBundle/Resources/config/routing/security.xml"

fos_user_profile:
    resource: "@FOSUserBundle/Resources/config/routing/profile.xml"
    prefix: /profile

fos_user_register:
    resource: "@FOSUserBundle/Resources/config/routing/registration.xml"
    prefix: /register

fos_user_resetting:
    resource: "@FOSUserBundle/Resources/config/routing/resetting.xml"
    prefix: /resetting

fos_user_change_password:
    resource: "@FOSUserBundle/Resources/config/routing/change_password.xml"
    prefix: /profile

_imagine:
    resource: .
    type:     imagine

_security_check:
    pattern:  /login_check

_security_logout:
    pattern:  /logout

Hope, these info are enough.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions