Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added env for application url in prep to host this via cicd process #252

Merged
merged 3 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions socios-oauth2/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from "path";
import express from "express";
import { Server } from "./../token-negotiator-server/dist/index.js";
import { Server } from "@tokenscript/token-negotiator-server";
import { fileURLToPath } from 'url';
import bodyParser from "body-parser";
import cookieParser from "cookie-parser";
Expand Down Expand Up @@ -32,8 +32,7 @@ const tokenNegotiatorServer = new Server({
}
});

// Same origin Cors
const corsOptions = { origin: 'http://localhost.5000' }
const corsOptions = { origin: process.env.APPLICATION_URL }

app.get("/", function (request, response) {
response.sendFile(path.join(__dirname, "./public/index.html"));
Expand Down
71 changes: 68 additions & 3 deletions socios-oauth2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions socios-oauth2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"license": "ISC",
"dependencies": {
"@tokenscript/token-negotiator": "^3.0.0",
"@tokenscript/token-negotiator-server": "^0.1.0",
"body-parser": "^1.20.2",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
Expand Down
8 changes: 0 additions & 8 deletions socios-oauth2/public/socios-client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ const sociosClientConfig = () => {
path: "http://localhost:5000/user-login-callback",
params: {}
},
userLogout: {
path: "http://localhost:5000/user-logout",
params: {}
},
userSignature: {
path: 'http://localhost:5000/user-signature',
params: {}
},
userBalance: {
path: 'http://localhost:5000/user-balance',
params: {}
Expand Down