这是indexloc提供的服务,不要输入任何密码
Skip to content

Rethinking on auth plugin contract #1

@msp98

Description

@msp98

Right now the auth plugin has lots of loginWith methods.

loginWithGoogle()
loginWithMeta()
loginWithApple()
loginWithTwitter()
loginWithGithub()
loginWithLinkedin()
loginWithMicrosoft()

Which might grow as soon as we want to add a new provider method. And this functionality is "closed"(in OCP terms), but not open for adding new providers.
A better way would be to open the plugin interface for adding a provider implementation, and accept a contract for login, logout etc.
This way the core plugin contract will not have to worry about adding new providers, as and when required, keeping the abstractions at the heart and extensibility at the consumer end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions