You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @wen-templari, this issue is the remaining blocker for nbtca/Roadmap#64, so I'd love to see it move forward. I'm happy to help with the Saturday or Home side.
While looking around, I noticed two things that might be useful:
Sunday's /register calls POST /members/{id}/logto, which was removed in the Huma migration, so self-registration is currently broken.
Approving a member in Sunday only updates Saturday's role column. It doesn't assign the Logto Repair Member role, which is what auth actually checks.
I'm not sure how you'd like onboarding to work, e.g. who can apply or how Logto roles get assigned. I'd rather follow your design. If you can share the rough direction or split out a task, I'll pick it up.
After deprecating Sunday, we no longer have an UI for member/role management or an approval process. I am adding user using following steps:
Assign user role (Repair Member) in Logto admin panel
Add member (user) record in Saturday's database.
Then after user login, role will be synced to Saturday's database.
Here are the feature requirements I can think of:
Everyone should be able to apply access to repair tickets (with additional info like Personal No...)
User with role should be able to accept repair tickets
Admin should be able to review role requests
Admin should be able to manage user access (manual prevision/ off boarding)
Admin should be able to see audit log for User role operation
For implementation, I am considering following two options
A. Using external service built on Cloudflare workers. Provide: Initial application form, Role management, call Logto/ Saturday to sync role/ user info. (Could reference the previous join-us worker)
B. Follow existing pattern, update Saturday and Home, add API and UI for onboarding/ user management.
I personally prefer option A as it can move more of our infrastructure to Cloudflare. And as we are currently not only relay on Saturday's api for repair ticket but also for getting entire org's member list, we can move responsibilities to this worker.
I ran Logto, Saturday and Home locally and walked the flow with four test accounts. Here is what the current setup does, and what we think the design should cover.
Current behavior
Access needs two things: the Repair Member role in Logto, and a Saturday member row with a matching logto_id.
A user with the role but no member row can open /repair/admin, but every member API returns 401. The page shows an empty list and no error.
A user without the role is sent back to the login hint page. It gives no reason and no way to apply.
Roles are not synced on login from Home. The sync lives in GET /member/token/logto, and only Sunday calls it.
Saturday's member.role still matters. New-ticket notifications go only to members whose stored role is member or admin, and POST /members stores new members as member_inactive.
The self-registration route POST /members/{id}/logto was dropped in 045054f. Its handler is still in router/member.go.
Our view
Option A works for us. We'd like Logto to be the only place that stores roles. Saturday already checks Logto on every request, so removing a role takes effect at once.
The worker should not have to write to both Logto and Saturday. If one write fails, we get the role-only state above. Instead, Saturday can create the member row on the first request from a user who has the role.
For that, the worker writes the student number and name into the user's Logto custom_data at approval. Home already requests the custom_data scope.
Notifications should read roles from Logto, not from member.role. Otherwise stored roles drift from real access.
Moving the org member list to the worker can wait until onboarding works.
Questions
Do you add member rows with SQL or with POST /members? The API path stores them as member_inactive, so they get no new-ticket notifications.
What should the application collect, and who can see it?
Who deploys the worker and owns its Logto M2M credentials?
Provide a form for info needed for entry (as we are requiring internal org member to have: Student No, Name, Class info). For existing users, open this form will show hint: already joined. For user had submitted form before, show hint about last submission. We should get user identity by putting this form behind auth.
Provide notification on entry form status change (approve/denied)
For org admin,
UI for resolve new user request
UI for user management (manage those user in Saturday, basic info, account linking, role...)
What should this worker store
new org user request record
audit log for approval, org user management
For that, the worker writes the student number and name into the user's Logto custom_data at approval. Home already requests the custom_data scope.
As for where should role be created after admin approves user join request, currently Saturday read role info from logto after user login, I think we can keep that way, and keep Saturday more clean and focus on repair ticket logic.
Activity
m1ngsama commentedon Sep 21, 2026
Hi @wen-templari, this issue is the remaining blocker for nbtca/Roadmap#64, so I'd love to see it move forward. I'm happy to help with the Saturday or Home side.
While looking around, I noticed two things that might be useful:
/registercallsPOST /members/{id}/logto, which was removed in the Huma migration, so self-registration is currently broken.rolecolumn. It doesn't assign the LogtoRepair Memberrole, which is what auth actually checks.I'm not sure how you'd like onboarding to work, e.g. who can apply or how Logto roles get assigned. I'd rather follow your design. If you can share the rough direction or split out a task, I'll pick it up.
wen-templari commentedon Sep 21, 2026
After deprecating Sunday, we no longer have an UI for member/role management or an approval process. I am adding user using following steps:
Then after user login, role will be synced to Saturday's database.
Here are the feature requirements I can think of:
For implementation, I am considering following two options
A. Using external service built on Cloudflare workers. Provide: Initial application form, Role management, call Logto/ Saturday to sync role/ user info. (Could reference the previous join-us worker)
B. Follow existing pattern, update Saturday and Home, add API and UI for onboarding/ user management.
I personally prefer option A as it can move more of our infrastructure to Cloudflare. And as we are currently not only relay on Saturday's api for repair ticket but also for getting entire org's member list, we can move responsibilities to this worker.
Please consider this and we can finalize an implementation plan.
@m1ngsama @LazuliKao @Yuna-Celisse
m1ngsama commentedon Sep 22, 2026
I ran Logto, Saturday and Home locally and walked the flow with four test accounts. Here is what the current setup does, and what we think the design should cover.
Current behavior
Repair Memberrole in Logto, and a Saturday member row with a matchinglogto_id./repair/admin, but every member API returns 401. The page shows an empty list and no error.GET /member/token/logto, and only Sunday calls it.member.rolestill matters. New-ticket notifications go only to members whose stored role ismemberoradmin, andPOST /membersstores new members asmember_inactive.POST /members/{id}/logtowas dropped in 045054f. Its handler is still inrouter/member.go.Our view
custom_dataat approval. Home already requests thecustom_datascope.member.role. Otherwise stored roles drift from real access.Questions
POST /members? The API path stores them asmember_inactive, so they get no new-ticket notifications.wen-templari commentedon Sep 22, 2026
This worker should provide following features:
For new user who want to join org,
For org admin,
What should this worker store
I would suggest not to use custom_data, as it is not meant to be used for storing sensitive data https://docs.logto.io/user-management/user-data#custom-data
As for where should role be created after admin approves user join request, currently Saturday read role info from logto after user login, I think we can keep that way, and keep Saturday more clean and focus on repair ticket logic.
wen-templari commentedon Sep 27, 2026
We can also consider merge https://github.com/nbtca/serverless-active and https://nbtca.space/freshman/join into this new design.