Browse Source

temporarily hard-coding baseurl

master
Spencer Flagg 3 years ago
parent
commit
c65e05295f
2 changed files with 4 additions and 2 deletions
  1. +3
    -1
      login/index.js
  2. +1
    -1
      middleware/auth-guard.js

+ 3
- 1
login/index.js View File

@ -29,7 +29,7 @@ const baseURL = function () {
const portier = new PortierClient({
//broker: process.env.PORTIER_URL,
redirectUri: baseURL() + "/login/verify",
redirectUri: "https://flylocal.us/login/verify",
});
@ -224,6 +224,7 @@ app.get("/", (req, res) => {
app.post("/auth", formParser, (req, res) => {
console.log("auth");
console.log(baseURL());
//console.log(req.body);
@ -239,6 +240,7 @@ app.post("/auth", formParser, (req, res) => {
app.post("/verify", formParser, (req, res) => {
//console.log(req.body);
console.log("verify");
console.log(baseURL());
portier.verify(req.body.id_token).then((email) => {

+ 1
- 1
middleware/auth-guard.js View File

@ -1,6 +1,6 @@
export default function ({ route, redirect, app }) {
//console.log("auth: " + $auth)
console.log("app: " + app)
console.log("app cookie: " + app.$cookies.get('email'))
if (route.path.includes('/flights')) {
const REDIRECT_URL = '/login/?redirect=' + route.path
if (!app.$cookies.get('email')) {

Loading…
Cancel
Save