NbDummyAuthStrategy missing option to set redirect path
- Vorherrschende Sprache
- TypeScript
- Sterne
- 8.1k
- Forks
- 1.5k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Issue type
**I'm submitting a ...** (check one with "x")
* [ ] bug report
* [x] feature request
### Issue description
**Current behavior:**
NbDummyAuthStrategy has no option to set redirect path after "successful" login. Hardcoded value redirects to `/`.
https://github.com/akveo/nebular/blob/master/src/framework/auth/strategies/dummy/dummy-strategy.ts#L67
```
return new NbAuthResult(true, this.createSuccessResponse(data), '/', [], ['Successfully logged in.'], token);
```
**Expected behavior:**
redirect option could be set if needed, as example:
```
export class NbDummyAuthStrategyOptions extends NbAuthStrategyOptions {
token?: NbStrategyToken = {
class: NbAuthSimpleToken,
};
delay?: number = 1000;
alwaysFail?: boolean = false;
redirect?: string = '/';
}
```
**Related code:**
https://github.com/akveo/nebular/blob/master/src/framework/auth/strategies/dummy/dummy-strategy-options.ts
https://github.com/akveo/nebular/blob/master/src/framework/auth/strategies/dummy/dummy-strategy.ts
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.