Closed visyone closed 6 years ago
Hi @visyone, can you give us more details on Implement nebular authorization flow as described in their documentation
? As I'm just trying to replicate your stepts and it's working fine for me.
You are probably referring to this article https://akveo.github.io/nebular/#/docs/auth/protecting-application-routes, if so please add import 'rxjs/add/operator/do';
import inside of your route-guard, that should fix the issue.
Hi @nnixaa, I probably did not explain the behavior well. What I do is:
npm install
commandnpm start
commandOpening the browser no login page appears, but I find an error in the browser console. From this point, after stopping the application, if I follow the steps below everything works (I see the login page):
package.json
file and change the value of the modules @nebular/auth
and @nebular/theme
from 2.0.0-rc.4
to2.0.0-rc.3
npm update
commandnpm start
commandEverything works without having to do anything if I take the first step starting with the source files (.zip) of version 2.0.1
I hope I have described everything necessary to reproduce the case. Thanks so much
Hi @visyone, thanks again for the detailed steps. May I ask you to add the following import import 'rxjs/add/operator/do';
on top of your guard and try again with rc4 nebular version?
Hi @nnixaa, I tryed to add the import and effectively the error disappear and all works.
This behavior is strange, I have replicated the case on two different machine and the same error occurs, all works normally for you instead.
Can be that the import that you mention is a missing import from nebular introduced in the 2.0.0-rc.4 release? If not I don't understand because this occurs.
Yes, previously the do
operator was included in the release build, that's why it was working without the import. Starting from rc4 you need to import the rxjs operator you need manually. This is expected behavior so I'm closing the issue. We already updated the documentation to include a proper example. Thanks for your help!
Perfect, I update my code according to the aspected behavior.
Thanks to you!
Issue type
I'm submitting a ... (check one with "x")
Issue description
Current behavior: Implementation of authorization flow with
nebular
components doesn't works in 2.0.2 theme releaseExpected behavior: The login page is shown after authorization flow has been implemented
Steps to reproduce:
npm install
in the 2.0.2 local release foldernebular
authorization flow as described in their documentationThe login page should appear, an error is shown instead in the browser console.
The error occurs after the implementation of the
AuthGuard
service as described in the nebular documentation. Seems that thethis.authService.isAuthenticated()
method isn't resolved.Other information:
Node: 8.9.4 npm: 5.6.0 OS: Windows 10 Browser: Chrome/Firefox/Edge
If I modify the
package.json
file downgrading the@nebular/theme
and@nebular/auth
modules from 2.0.0-rc.4 to 2.0.0-rc.3; launchnpm upgrade
and restart the theme; the login page is shown and the error disappear.All works if I use 2.0.1 ngx-admin theme release without downgrading anything