简体   繁体   中英

Symfony 2 Oauth2 issue with HwiOauthBundle

I'm using HWIOAuthBundle (with google configuration) for authentication in one of my project.

It works very well most of the time. But at some point when I surf on the application, I get an error about the google_id. It doesn't appear on a specific page but all sudenly (after a period of inactivity). Basically, the google_id that my user provider get is suddenly null. As I'm not able to reproduce the error and it's very difficult to debug.

It seems to come from either the HWIOAuth bundle for which I'm may be using wrong configuration settings or from Symfony 2 session. But I tried changing the session life time and nothing work (as I said I'm not beeing able to reproduce the error on demand. It appears out of the blue...).

Do you have any idea how to solve this issue?

Regards

I've encountered the same issue. The access token retrieved from Google is no longer valid and needs to be refreshed. Unfortunately I haven't found out a good way to do it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM