Skip to content

Conversation

@sakkyoi
Copy link
Contributor

@sakkyoi sakkyoi commented Sep 2, 2025

Description

Fixes an issue where users created through SSO auto-registration cannot access the system properly.

Problem

After a user is auto-registered, the role field is set to null, which prevents the user from accessing the system:

{
    "code": 200,
    "message": "success",
    "data": {
        ...
        "role": null,
        ...
    }
}

Additionally, administrators are unable to modify the affected user unless they delete the account first.

Solution

  • Assign default roles to auto-registered users following the same logic as normal registration.
  • Fixed a minor issue in the OIDCLoginCallback where return was missing after an error response.

@okatu-loli
Copy link
Collaborator

@sakkyoi Can you provide a demo video?

@okatu-loli okatu-loli self-requested a review September 3, 2025 03:47
@sakkyoi
Copy link
Contributor Author

sakkyoi commented Sep 3, 2025

螢幕擷取畫面 2025-09-03 212334 Sorry for providing only screenshots, but I believe they are sufficient to demonstrate the issue.

As shown, the user is created successfully, but no role is assigned.
螢幕擷取畫面 2025-09-03 212547
This behavior follows the current original logic of SSO auto-registration.

Here are my SSO settings for reference:
image

@skysliences skysliences self-requested a review September 4, 2025 14:07
@alist666 alist666 merged commit 930f9f6 into AlistGo:main Sep 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants