-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Passport #2809
Remove Passport #2809
Conversation
bfb4c4d
to
57a00e0
Compare
packages/api/cms-api/src/auth/services/static-authed-user.auth-service.ts
Outdated
Show resolved
Hide resolved
…-service.ts Co-authored-by: Johannes Obermair <48853629+johnnyomair@users.noreply.github.com>
A section in the migration guide is a must have IMO. If you want, you could also add an upgrade script. Though I believe it would be difficult to cover all usages across our projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some projects we use custom passport strategies, sometimes third-party, (e.g. https://www.npmjs.com/package/passport-headerapikey).
As far as I understand, this is still possible without passport in the library. Is this correct or could this cause problems?
Co-authored-by: Thomas Dax <thomas.dax@vivid-planet.com>
Co-authored-by: Thomas Dax <thomas.dax@vivid-planet.com>
|
|
@johnnyomair Do we want this in v8? I would resolve the conflicts then so that you can merge it. |
@fraxachun I'd say yes. @thomasdax98 what do you think? |
9938b0c
Yes, definitely |
@johnnyomair Conflicts resolved |
Description
We decided to remove passport and use built in mechanism instead.
Strategy
toAuthService
AuthProxyJwtStrategy
=>JwtAuthService
StaticAuthedUserStrategy
=>StaticUserStrategy
StaticCredentialsBasicStrategy
=>BasicAuthService
createAuthGuardProviders
to create providers (instead intransparentstrategy-names
)JwtAuthService
uses@nestjs/jwt
and is more flexible to cover different use casesAuthService
(this is the correct place, notUserPermissionService
orUserService
)CometAuthGuard
working without the need of a factory (makes it easier expandable)CometAuthGuard
creates theCurrentUser
-Object (insteadAuthService
, they're only forUser
)JwtModule
fromcms-api
(has to be added toimports
inauth.module.ts
whenJwtAuthService
is used)Open TODOs/questions
userService.getUser()
inCometAuthGuard
- separate PRFurther information
https://vivid-planet.atlassian.net/browse/COM-1201