我有一个Node.js
后端,我在其中实现了Passport JS
进行身份验证(用户名密码和Google)。我有两个前端,一个在Angular
中的SPA Web应用程序,另一个在{N} Angular
中的移动应用程序。
身份验证在Web应用程序中正常工作(请参见下面的流程):
<a href="http://localhost:3000/auth/google">Google Sign In</a>
loginRouter.get('/auth/google', passport.authenticate('google', { scope : 'email' }));
loginRouter.get('/auth/google/callback', passport.authenticate('google', {successRedirect: "http://localhost:4200/home?blob=dataWithToken"}));
我的问题是,“如何在Nativescript中实现此流程?”
我试图在我的{N}
应用中添加Web视图,但是出现以下错误:
google can't sign you in safely inside this app ...
有什么想法吗?有游乐场吗?