Create the 'yiisoft/auth-session' package to replace the 'yiisoft/user' package
@klsoft-web is already working on this.
Since Sep 4, 2026.
Assessment
This issue has not been assessed yet.
Description
The 'user' term is more relevant to a package that implements the Yiisoft\Auth\IdentityInterface interface, whereas the yiisoft/user package implements various authentication methods via the session:
- The
authenticate(ServerRequestInterface $request)method checks if an identity ID is saved in thesession. - The
login(IdentityInterface $identity)method sets an identity ID in thesession. - The
logout()method removes an identity ID from thesession.
And so on.
The names 'ApiAuth' and 'WebAuth' do not have to be related to the API or web application.
The AuthenticatorInterface is a universal interface for any application that uses sessions.
As the 'yiisoft/user' package contains many misleading names, including its own, the following names were suggested for the new package:
- 'yiisoft/auth-session' instead of 'yiisoft/user'
- AuthManager instead of CurrentUser
- Authenticator instead of ApiAuth and WebAuth
The AuthManager method names are:
- isAuthenticated() instead of isGuest()
Originally posted by @klsoft-web in https://github.com/yiisoft/docs/discussions/514
- Dominant language
- PHP
- Stars
- 23
- Forks
- 7
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from yiisoft/user
-
status:under discussion
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
Similar issues
-
product / databases
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
VilnaCRM-Org/user-service#525 ·
Maintainers usually reply within 21 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
shukiv/jabali-panel#2029 ·
Maintainers usually reply within 1 day
-
area:pool-types good first issue priority:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
crazy-goat/php-fpm-ng#822 ·
Maintainers usually reply within 1 day
-
agentic bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MagnaCapax/PMSS#1023 · 1 comment ·
Maintainers usually reply within 5 days