Skip to content

Add user profile factory for authentication modules #3846

Description

@jannyHou

Suggestion

This is a follow-up story for PoC #3771

Use Cases

Allow the strategy adapter to add a user profile factory that converts the returned user from a passport strategy to the user profile.

Examples

See the background and example in PoC PR

Acceptance criteria

  • Add interface UserProfileFactory and key USER_PROFILE_FACTORY in
    @loopback/authentication to help developers inject the factory wherever it's
    needed.
  • Add userProfileFactory in StrategyAdapter's constructor.
  • Tests
  • Document

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions