Firebase身份验证重定向至谷歌登录页面至Vue路由器
我正在使用VueJS和Vue路由器。自从将Firebaseauth域从默认的example.firebaseapp.com更改为example.com以来,允许用户使用其Google帐户进行身份验证的重定向不再起作用。重定向卡在Firebase身份验证重定向至谷歌登录页面至Vue路由器,firebase,vue.js,firebase-authentication,vue-router,google-account,Firebase,Vue.js,Firebase Authentication,Vue Router,Google Account,我正在使用VueJS和Vue路由器。自从将Firebaseauth域从默认的example.firebaseapp.com更改为example.com以来,允许用户使用其Google帐户进行身份验证的重定向不再起作用。重定向卡在https://example.com/__/auth/handler?apiKey=X&appName=X&authType=signInViaRedirect&providerId=google.com firebase.initializeApp({ apiKe
https://example.com/__/auth/handler?apiKey=X&appName=X&authType=signInViaRedirect&providerId=google.com
firebase.initializeApp({
apiKey: "123456789",
authDomain: "example.com",
databaseURL: "https://example.firebaseio.com",
projectId: "example",
storageBucket: "example.appspot.com",
messagingSenderId: "123456789"
});
我尝试删除我的htaccess,并将重定向url/\uuu/auth/
添加为路由路径
router.js:
import Vue from "vue";
import router from "vue-router";
import Signup from "./components/User/Signup";
import AuthGuard from "./auth-guard";
import NotFound from "./components/User/NotFound";
Vue.use(router);
export default new router({
routes: [
{
path: "/",
name: "Home",
component: Home
},
{
path: "/signup",
name: "Signup",
component: Signup
},
{ path: "*", name: "NotFound", component: NotFound }
],
mode: "history"
});
auth guard.js
import store from "./store";
export default (to, from, next) => {
if (store.getters.user) {
next();
} else {
next("/signup");
}
};
如何使重定向工作