backdrop-contrib / hybridauth

Use the HybridAuth library to allow logins through various third party systems.
GNU General Public License v2.0
0 stars 1 forks source link

Admin / Permission error when logging in. #13

Open benjiboi214 opened 3 years ago

benjiboi214 commented 3 years ago

Hi,

I will admit I am new to the Backdrop ecosystem. If there is anything that is clearly not a responsibility of your module, please feel free to tell me. I don't want to waste your time :)

Now, I've installed HybridAuth on my Backdrop installation and configured the package to connect to my Google App. The Google button appears on my login / register pages and when clicked appears to execute the OAuth flow correctly.

However, after the callback is triggered and I get redirected back to the Login page, I see an error that says the following:

Only site administrators can create new user accounts.

I've ensured that my account & HybridAuth settings have the "Who can register accounts?" set to "Visitors". I wish I could debug further, but nothing is showing up in my debug logs even though HybridAuth debug mode is on.

Just a little lost. Any help would be greatly appreciated.

Here are the relevant config files:

`.../hybridauth.settings.json`

```json { "_config_name": "hybridauth.settings", "hybridauth_required_fields": { "email": 0, "firstName": 0, "lastName": 0, "gender": 0 }, "hybridauth_widget_title": "Login with:", "hybridauth_widget_type": "list", "hybridauth_widget_use_overlay": 0, "hybridauth_widget_link_text": "", "hybridauth_widget_link_title": "", "hybridauth_widget_icon_pack": "hybridauth_32", "hybridauth_widget_weight": "", "hybridauth_widget_hide_links": 0, "hybridauth_register": "0", "hybridauth_email_verification": "0", "hybridauth_email_verification_subject": "Account details for [user:name] at [site:name]", "hybridauth_email_verification_body": "[user:name],\r\n\r\nThank you for registering at [site:name]. You need to confirm your e-mail address by clicking this link or copying and pasting it to your browser:\r\n\r\n[user:one-time-login-url]\r\n\r\nThis link can only be used once to log in and activate your account.\r\n\r\nAfter that, you will be able to log in at [site:login-url] using your [user:hybridauth:provider] account.\r\n\r\n-- [site:name] team", "hybridauth_pictures": 0, "hybridauth_username": "[user:hybridauth:email]", "hybridauth_display_name": "", "hybridauth_registration_username_change": 1, "hybridauth_registration_password": 1, "hybridauth_override_realname": 0, "hybridauth_disable_username_change": 0, "hybridauth_remove_password_fields": 0, "hybridauth_forms": { "user_login": "user_login", "user_login_block": "user_login_block", "user_register_form": "user_register_form", "comment_form": "comment_form" }, "hybridauth_destination": "", "hybridauth_destination_error": "", "hybridauth_duplicate_emails": "0", "hybridauth_proxy": "", "hybridauth_debug": true, "vtabs__active_tab": "", "hybridauth_providers": { "Google": "Google", "AOL": 0, "Facebook": 0, "Foursquare": 0, "LinkedIn": 0, "Live": 0, "MySpace": 0, "OpenID": 0, "Twitter": 0, "Yahoo": 0, "px500": 0, "Disqus": 0, "FamilySearch": 0, "Geni": 0, "GitHub": 0, "Goodreads": 0, "HumanitarianId": 0, "Identica": 0, "Instagram": 0, "LastFM": 0, "Mailru": 0, "Murmur": 0, "MyHeritage": 0, "Odnoklassniki": 0, "Pixnet": 0, "Plurk": 0, "QQ": 0, "Sina": 0, "Skyrock": 0, "Steam": 0, "Tumblr": 0, "TwitchTV": 0, "Viadeo": 0, "Vimeo": 0, "Vkontakte": 0, "Yandex": 0, "Paypal": 0 }, "hybridauth_provider_Google_keys_id": "<< REMOVED >>", "hybridauth_provider_Google_keys_secret": "<< REMOVED >>", "hybridauth_provider_Google_window_type": "current" } ```

`.../system.core.json`

```json { "_config_name": "system.core", "_config_static": true, "_config_translatables": [ "anonymous", "site_name", "site_slogan", "maintenance_mode_message" ], "action_recursion_limit": 35, "active_menus_default": [ "menu-about-navigation", "user-menu", "management", "main-menu", "menu-new-layout-account-menu" ], "admin_theme": "seven", "anonymous": "Anonymous", "cache": 0, "canonical_secure": 0, "clean_url": "1", "config_sync_batch_size": 20, "config_sync_clear_staging": 1, "cron_threshold_warning": 172800, "cron_safe_threshold": 10800, "cron_max_threshold": 10800, "cron_threshold_error": 1209600, "default_nodes_main": 10, "error_level": "all", "field_purge_batch_size": 200, "file_default_allowed_extensions": "jpg jpeg gif png txt doc docx xls xlsx pdf ppt pptx pps ppsx odt ods odp mp3 mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm", "file_default_scheme": "public", "file_private_path": "", "file_public_path": "files", "file_temporary_path": "/tmp", "file_transliterate_lowercase": 1, "file_transliterate_uploads": 1, "file_transliterate_uploads_display_name": 0, "filter_fallback_format": "plain_text", "form_cache_expiration": 21600, "image_toolkit": "gd", "image_jpeg_quality": "75", "image_style_flood_limit": 5, "install_profile": "standard", "language_count": 1, "language_default": "en", "log_row_limit": "1000", "log_date_format": "Y-M-d H:i:s", "log_identity": "backdrop", "log_facility": "128", "log_format": "!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message", "maintenance_mode_message": "[site:name] is currently under maintenance. We should be back shortly. Thank you for your patience.", "maintenance_page_maximum_age": 10, "maintenance_theme": null, "menu_route_handler": "layout_route_handler", "node_admin_theme": 0, "page_cache_maximum_age": "300", "page_cache_background_fetch": 1, "page_cache_keep_stale_age": 172800, "page_compression": 1, "preprocess_css": 0, "preprocess_js": 0, "rss_description": "", "rss_limit": 10, "rss_viewmode": "fulltext", "site_403": "", "site_404": "", "site_favicon_theme": 0, "site_favicon_path": "public://mmpl-favicon.png", "site_favicon_mimetype": "image/png", "site_frontpage": "home", "site_name": "Melbourne Metropolitan Pool League", "site_logo_theme": 0, "site_logo_path": "public://mmplheader.png", "site_mail": "noreply@mmpl.org.au", "site_slogan": "Twice yearly World Rules pool tournament in the CBD and surrounds.", "theme_default": "tatsu", "theme_debug": 0, "user_admin_role": "administrator", "user_cancel_method": "user_cancel_reassign", "user_email_verification": 1, "user_email_match": 1, "user_login_method": "email_only", "user_mail_status_activated_notify": 1, "user_mail_status_blocked_notify": 0, "user_mail_status_canceled_notify": 0, "user_register": "visitors", "user_signatures": 0, "user_password_reject_weak": 1, "user_password_strength_threshold": 50, "user_password_reset_timeout": 86400, "user_pictures": 0, "user_picture_path": "pictures", "user_picture_default": "", "user_picture_style": "thumbnail", "user_picture_dimensions": "1024x1024", "user_picture_file_size": "800", "user_picture_guidelines": "", "watchdog_enabled_severity_levels": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "x_frame_options": "SAMEORIGIN", "site_logo_attributes": { "width": 1764, "height": 681 }, "path_pattern": "user/[user:uid]", "site_logo_upload": "", "site_favicon_upload": "", "dblog_row_limit": "1000", "dblog_date_format": "Y-M-d H:i:s", "syslog_identity": "backdrop", "syslog_facility": "128", "syslog_format": "!base_url|!timestamp|!type|!ip|!request_uri|!referer|!uid|!link|!message" } ```

laryn commented 3 years ago

Hi @benjiboi214 and welcome!

I'll try to reproduce -- I am using the Google login functionality on a site so it should be functional.

If you think of anything else that might be helpful just update this thread.

laryn commented 3 years ago

@benjiboi214 Do you have anything set in the redirect options under "Other settings" in Hybridauth?

laryn commented 3 years ago

@benjiboi214 I just tested with the latest dev version (there was an update since you posted) and with the HybridAuth setting set to "Visitors" I had no problem creating a new account using the Google provider integration. Can you test the latest and post back results?

laryn commented 3 years ago

@benjiboi214 Just checking -- did your Google app get both Contact and Google+ api access?

benjiboi214 commented 3 years ago

@laryn - Just wanted to let you know I haven't ghosted this. Appreciate your help so far. I recently got married and been on a few weeks of leave. Will test this as soon as I am able.