Skip to content

Unable to provide custom NbAuthService #1816

Open
@tcbuzor

Description

@tcbuzor

Issue type

I'm submitting a ... (check one with "x")

  • [ x] bug report
  • feature request

Issue description

  1. I extended NbAuthService
  2. provided the custom authprovider in my auth module : { provide: NbAuthService, useClass: CustomAuthService},
  3. Defined a custom LoginComponent which receives NbAuthService
  4. CustomAuthService authenticate returns a NbDummyAuthStrategy instead of the configured NbPasswordAuthStrategy.
    Current behavior:

CustomAuthProvider authenticate returns NbDummyAuthStrategy
Expected behavior:

CustomAuthProvider authenticate should return the configured AuthStrategy
Steps to reproduce:

Extend NbAuthService, Define custom LoginComponent, Setup NbPasswordAuthStrategy, invoke authenticate from LoginComponent.
Related code:

insert short code snippets here

Other information:

npm, node, OS, Browser

<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions