grav-plugin-login-oauth
grav-plugin-login-oauth copied to clipboard
Stuck in Google account picker loop
A setup using no login path in the Login plugin settings seems to work if I have all the redirect URI's added to my google API credentials, but when I use the login path (eg. /login) so that I only have to use one redirect URI (eg. www.mysite.com/login) then I get stuck during authorization in a loop where I pick my google account and it redirects, redirects and then goes back to picking a google account (that's on Safari). On Chrome, I get "accounts.google.com redirected you too many times."
I deleted my Google API credentials and redeployed a new Google credentials, cleared cookies and tried again. No luck.
@kmcital what does your config file look like? (please comment out API keys).
@Vivalldi here you go...
login-oauth.yaml:
enabled: true
built_in_css: true
providers:
Facebook:
enabled: false
enable_email: false
Google:
enabled: true
credentials:
key: xxxxxxxxxx
secret: xxxxxxxxxxx
whitelist:
- mydomain.com
GitHub:
enabled: false
Twitter:
enabled: false
Linkedin:
enabled: false
login.yaml (with current workaround of no login route path specified, otherwise I would add /login
):
enabled: true
built_in_css: true
route_activate: /activate_user
route_forgot: /forgot_password
route_reset: /reset_password
route_profile: /user_profile
route_register: /user_register
parent_acl: true
protect_protected_page_media: false
user_registration:
enabled: true
fields:
- username
- password
- email
- fullname
- title
access:
site:
login: 'true'
options:
validate_password1_and_password2: true
set_user_disabled: false
login_after_registration: true
send_activation_email: false
send_notification_email: false
send_welcome_email: '1'
rememberme:
enabled: true
timeout: 604800
name: grav-rememberme
max_pw_resets_count: 0
max_pw_resets_interval: 60
max_login_count: 0
max_login_interval: 2
@kmcital I am unable to reproduce this. I've used the same configuration (save for client keys) and added the login path as you specified. I am able to login as normal with Google.
Can you PM me on slack?
@Vivalldi I encountered same problem. Is this issue resolved or not yet? Thank you!
We work around the issue by modifying our configuration and logging in only on the main home page of the site. It works there, but fails everywhere else. Haven't spent more time to resolve it beyond that.
On Feb 5, 2018, at 7:16 PM, Martin Liu [email protected] wrote:
@Vivalldi https://github.com/vivalldi I encountered same problem. Is this issue resolved or not yet? Thank you!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/getgrav/grav-plugin-login-oauth/issues/18#issuecomment-363297585, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC8uuvFm70eqw1y-1VPHDWYfMjIwQHlks5tR8QhgaJpZM4O6VUt.
I'm having this same issue on my site. The Google account picker is returning a state in the URL, but the Grav login system doesn't appear to be picking it up for some reason. Like another user, I have manually configured the login route to /login
. Having that unset doesn't allow the direct login page to work.
Might these issues be related?
I have updated grav and all plugins last night and i'm having the same issue.
Has this been solved or is there anything I can do as a Work around besides disabling it?
EDIT: Another thing I noticed is that even if I want to use the username/password combination, there's no password field.
This is the form from the comments plugin which is rather strange