Skip to content

[PUI] Use sessions backend for login #6391

Closed

Description

@matmair

@matmair this review process has made me question - is it a good idea to just use CSRF session auth for PUI (as we do for CUI) and not use API tokens at all? As far as I can see there are two major advantages:

Session Management

Using a single session (based on CSRF token) means that CUI and PUI are in sync. No need to manage two separate login methods (session token / API token) as we do now.

File Downloads

Moving to session auth would allow us to download files / reports / etc in the browser - a problem which is currently hard to solve with API tokens - see #5697

So, move to session token and this problem goes away (because the web session has the same token and we don't have to work out how to pass an API token to a file download).


Thoughts on this? Now that we are deep in the weeds on this is the right time to do it. I'm just not sure how to get the CSRF token into the session when you login from PUI - we have to replicate the CUI behaviour...

Originally posted by @SchrodingersGat in #6368 (comment)

Activity

  1. self-assigned this
    on Feb 2, 2024
  2. added
    enhancement
    User Interface
    on Feb 2, 2024
  3. added this to the 0.14.0 milestone on Feb 2, 2024
  4. moved this from Todo to In Progress in User Interface Redesignon Feb 3, 2024
  5. matmair commented on Feb 3, 2024

    @matmair
    MemberAuthor

    login is working, looking at detecting if we logged out on CUI to log out of PUI

  6. modified the milestones: 0.14.0, 1.0.0 on Feb 4, 2024
  7. added a commit that references this issue on Mar 20, 2024
    7695e8f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

User Interfaceenhancementrefactor

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions