Browse Source

added dotenv to help login/index get variables

master
Spencer Flagg 3 years ago
parent
commit
1e4ae746b9
3 changed files with 9 additions and 0 deletions
  1. +3
    -0
      login/index.js
  2. +1
    -0
      package.json
  3. +5
    -0
      yarn.lock

+ 3
- 0
login/index.js View File

@ -3,6 +3,7 @@
// https://paul-senon.medium.com/node-express-js-cookies-set-get-secure-884311606148
import express from "express";
const dotenv = require('dotenv');
const formParser = require("body-parser").urlencoded({ extended: false });
import { PortierClient } from "portier";
@ -27,6 +28,8 @@ const cookieParser = require('cookie-parser');
// POST /logout Clear session cookies
// GET /logout Display a button to POST /logout
dotenv.config({ path: './.env' });
const portier = new PortierClient({
//broker: process.env.PORTIER_URL,
redirectUri: process.env.BASE_URL + "/login/verify",

+ 1
- 0
package.json View File

@ -22,6 +22,7 @@
"cookie-parser": "^1.4.6",
"cookie-universal-nuxt": "^2.1.5",
"core-js": "^3.15.1",
"dotenv": "^10.0.0",
"express": "^4.17.1",
"leaflet": "^1.7.1",
"net": "^1.0.2",

+ 5
- 0
yarn.lock View File

@ -4052,6 +4052,11 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"
dotenv@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81"
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==
dotenv@^8.1.0:
version "8.6.0"
resolved "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz"

Loading…
Cancel
Save