2

我有带有 reddit 设置的 HWIOAuthBundle。这是我用于登录的 html:

{% 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 %}

这作为例外工作。下一步,在 reddit.com 上接受用户访问,同样有效。之后我被重定向回我的页面(在我的情况下:)http://localhost:8004/app_dev.php/login/check-reddit。问题来了。我在上述错误循环中收到OAuth error: "404"或作为错误消息。Given CSRF token is not valid.

路线:

auth_reddit:
    pattern: /login/check-reddit

安全:

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

我也尝试var_dump("test");exit;在我的OAuthAwareUserProviderInterface. 它甚至没有到达那里。

4

0 回答 0