-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
3.1.5, 3.1.6-RC1, 3.1.6
-
None
-
PHP 5.4.26, MySQL 5.6.29
Hello,
There is an issue with Google OAuth Login.
Normal login by clicking on Login button works perfectly.
But when Guest user goes into a forum and try to make a Topic, It asks for Login and if a user chooses Google OAuth Login, phpBB throws error "No post mode specified".
What I feel is that as Mentioned here
https://www.phpbb.com/support/docs/en/3.1/ug/adminguide/general_client
"GOOGLE: Visit the Google Developers Console to create a new OAuth Client ID. You can find it on the left side under "APIs and auth --> Credentials". Your Client ID will serve as the key and your Client Secret will serve as the secret. Additionally, you will need to create a "Consent screen" in the Developers Console as well. Specify the following REQUEST URIS when you set up your client ID on the Google Developers Console:
http://
http://{your_board_URL}
/ucp.php?i=ucp_auth_link&mode=auth_link&link=1&oauth_service=google
The link ID may be different from your board. If it is, you will receive an error when attempting to link an account. Change the "1" to the number found in the request URI error that Google gives you."
The URL is relative to ucp.php?
So If a user tries to login from posting.php Google authentication throws an error.
So I have added following posting.php?mode=login&login=external&oauth_service=google to the Google Developer Dashboard settings but it will throw "No post mode specified" as mentioned above.
So My point is that Google throws error because Forum id is not passed and its not possible to add each of forum id's in google's "Authorised redirect URIs"
So there should be one single mechanism for login like login.php and the URL which has redirected the user to login page must be saved in the session so that once the user is logged in from google OAuth user should be redirected to login invoking URL.