2

I have HWIOAuthBundle with reddit setup. This is the html I use for login:

{% if error %}
    <div>{{ error.message }}</div>
{% endif %}
{% for owner in hwi_oauth_resource_owners() %}
    <a href="{{ hwi_oauth_login_url(owner) }}">{{ owner | trans({}, 'HWIOAuthBundle') }}</a>
    <br />
{% endfor %}

This works as excepted. The next step, accepting the user access on reddit.com, works as well. After that i get redirected back to my page (in my case: http://localhost:8004/app_dev.php/login/check-reddit). And here comes the problem. I get either OAuth error: "404" or Given CSRF token is not valid. as error messages in the above error loop.

routes:

auth_reddit:
    pattern: /login/check-reddit

security:

oauth:
    resource_owners:
        auth_reddit:   auth_reddit
            login_path:        login
            use_forward:       false
            failure_path:      login
            oauth_user_provider:
                service: xxx.authprovider

I also tried to but a debug var_dump("test");exit; in my OAuthAwareUserProviderInterface. It didn't even reached there.

Tuxes3
  • 439
  • 2
  • 19

0 Answers0