Skip to content

New Interface - Unable to Login with Google SSO #8949

Closed

Description

@duane701

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

'GenericOAuth2ApiLoginView' object has no attribute 'login'

Traceback (most recent call last):

File "/root/.local/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/root/.local/lib/python3.11/site-packages/allauth/socialaccount/providers/oauth2/views.py", line 105, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/home/inventree/src/backend/InvenTree/InvenTree/social_auth_urls.py", line 33, in dispatch
return self.login(request, *args, **kwargs)
^^^^^^^^^^

AttributeError: 'GenericOAuth2ApiLoginView' object has no attribute 'login'

Steps to Reproduce

  1. Open a new (incognito) screen
  2. Open the login page
  3. Login with SSO
  4. Confirm the SSO redirect

Internal Server Error
The server raised an internal error
Refer to the error log in the admin interface for further details

Expected behaviour

Expected to be redirected to Google for a login.

The login process works properly in the previous (original?) UI. That is I am redirected to Google to enter my credentials.

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

Version Information:

InvenTree-Version: 0.17.2
Django Version: 4.2.17
Commit Hash: 4b56492
Commit Date: 2025-01-07

Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.11.0-13-generic-x86_64-with
Installer: DOC

Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.1.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.1.0'}, {'name': 'InvenTreeLabelMachine', 'slug': 'inventreelabelmachine', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}]

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

Relevant log output

The bug is not reproducible on the demo site because of the use of SSO.

Activity

  1. added
    bug
    question
    triage:not-checked
    on Jan 25, 2025
  2. SchrodingersGat commented on Jan 25, 2025

    @SchrodingersGat
    Member

    @duane701 this will likely be addressed in #6293 which completely reworks SSO support for the new interface

  3. removed
    triage:not-checked
    on Jan 25, 2025
  4. added this to the 1.0.0 milestone on Jan 26, 2025
  5. added
    User Interface
    setup
    on Jan 27, 2025
  6. MrARM commented on Mar 18, 2025

    @MrARM

    This issue is still present in 0.17.9. Same exception and line numbers.

  7. SchrodingersGat commented on Mar 18, 2025

    @SchrodingersGat
    Member

    The fix in #6293 will be available at the next major release - it can't be backported to the 0.17.x branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    User Interfacebugquestionsetup

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions