Skip to content

[API] Auth login error #9211

Closed
Closed

Description

@SchrodingersGat

This error was caught on sentry.io

A GET request to /api/user/token/ resulted in a 500 status, and threw the following errors:

ValueError: You have multiple authentication backends configured and therefore must provide the `backend` argument or set the `backend` attribute on the user.
AttributeError: 'User' object has no attribute 'backend'

The trace points to this line of code:

login(request, user)

Activity

  1. added
    api
    bug
    security
    on Mar 1, 2025
  2. added this to the 1.0.0 milestone on Mar 1, 2025
  3. SchrodingersGat commented on Mar 1, 2025

    @SchrodingersGat
    MemberAuthor

    @matmair I am assuming this is related to the recent auth API refactor - can you please take a look?

  4. matmair commented on Mar 1, 2025

    @matmair
    Member

    I have an idea for a quick fix but the clean solution would be to remove the calls to /token completely - we do not need them for the frontend anymore.

    Is there any more context provided in sentry? I can not reproduce this reliably in my dev environment.

  5. added theissue type on Mar 1, 2025
  6. removed
    security
    on Mar 1, 2025
  7. added a commit that references this issue on Mar 1, 2025
    a76d2da
  8. added a commit that references this issue on Mar 1, 2025
    ac96ba4
  9. added a commit that references this issue on Mar 3, 2025
    b8bbc09
  10. added a commit that references this issue on Mar 4, 2025
    d96f0d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

apibug

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions