Skip to content

Conversation

@JohanHjelsethStorstad
Copy link
Member

This PR removes getUser and useUser to move to new authers and authresults.

To remove getUser some services now do not have auth checks but the auth object has been set up ready for their refactor.

@JohanHjelsethStorstad JohanHjelsethStorstad linked an issue Nov 3, 2025 that may be closed by this pull request
Copy link
Member

@theodorklauritzen theodorklauritzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good after the issue discussed are fixed

@JohanHjelsethStorstad
Copy link
Member Author

This I now fixed @theodorklauritzen

@Paulijuz
Copy link
Member

Paulijuz commented Jan 7, 2026

Looks really good. Just one small thing. I never really liked the word "auther". I always read "author", its non standard from what i can see, and it only saves four letters compared to the much clearer "authorizer".

I feel like for new people looking over the code, seeing something like this

const canEdit = useEditMode({ auther })

will look like a spelling mistake.

May i suggest switching to "authorizer" now that we have the chance? I have done this in the branch chore/clientside-session-authorizer so that you can have a look.

@JohanHjelsethStorstad
Copy link
Member Author

I agree. We can change it. Keeping names short has no purpose in my opinion. Just one question: the property authorizer often refers to some different things now: are the dynamic and/or static fields bound. And in the definition of a ServiceMethod or implementation of SubServiceMethod it is a function returning an authorizer with the fields bound. It is probably not a big deal since the type has the information, but there is some disconnect when the types have different names Authorizer AuthorizerStaticFielsBound and so on but the prop is always authorizer.

@Paulijuz
Copy link
Member

Paulijuz commented Jan 7, 2026

I totally agree. The naming could be a lot better, but this is one step in the right direction at least.

Copy link
Member

@Paulijuz Paulijuz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Im guessing this wont actually work

@Paulijuz Paulijuz requested a review from ablerto January 7, 2026 19:47
Copy link
Contributor

@ablerto ablerto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@ablerto ablerto merged commit 1289040 into main Jan 7, 2026
3 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.

chore/Standardize getting session

5 participants