Repository navigation
feat(auth-guard): add support for specifying a string to redirect to - #2448
Conversation
|
Seems that I did not think through the EDIT: I've temporarily removed support for specifying a |
UrlTree or a string to redirect tostring to redirect to
867478f to
e5cb663
Compare
c6e9fab to
cd67dd3
Compare
|
/cc @jamesdaniels Thoughts? It's been about a month now |
| authPipeFactory(next, state), | ||
| map(can => typeof can == "boolean" ? can : this.router.createUrlTree(<any[]>can)) | ||
| map(can => typeof can === 'boolean' ? can : | ||
| Array.isArray(can) ? this.router.createUrlTree(can) : this.router.parseUrl(can) |
There was a problem hiding this comment.
Can we have a test for this new functionality?
There was a problem hiding this comment.
The current tests don't seem to test much... I'll see what I can do.
|
Note: those suggestions would be relevant once @jamesdaniels confirms the feasibility of this approach |
|
I can't seem to rebase the changes - was the file updated in a recent commit? |
|
cd67dd3 to
9eeba6c
Compare
I've just fixed the conflicts locally. |
Until angular/angularfire#2448 is merged, query parameters can't currently be specified as arguments for `redirect*To` methods from the AngularFire auth guard module.
|
I'm good with this approach, UrlTree support would be great. |
I don't see any way for the user to pass in a |
Closes #2287
Closes #2144
Checklist
yarn install,yarn testrun successfully? (yes/no; required)Description
This PR introduces the ability to specify a
UrlTreeor astringto the return value of anAuthPipeand includes this feature in the existingredirect*Tomethods.Previously, as noted in #2287, it was not possible to specify additional extras that could be passed to
Router#createUrlTree.Code sample
UrlTree(not currently possible atm):// TODO