Skip to content

Add example for Authorization Code grant. #9

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

Merged
merged 12 commits into from
Jul 30, 2025
Prev Previous commit
Next Next commit
Fix dotenv.
  • Loading branch information
shrihari-prakash committed Jul 9, 2025
commit da94b0e5a1c4ccd3aa10e101df7e9ef86df67927
3 changes: 2 additions & 1 deletion authorization-code/client/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require("dotenv").config({ path: "../.env" });
require("dotenv").config();
const express = require("express");
const crypto = require("crypto");

Expand All @@ -9,6 +9,7 @@ app.set("view engine", "ejs");
app.set("views", "./views");
app.use(express.static("public"));

console.log(process.env.AUTH_SERVER);
const authServer = process.env.AUTH_SERVER;
const clientId = process.env.CLIENT_ID;
const clientSecret = process.env.CLIENT_SECRET;
Expand Down
4 changes: 2 additions & 2 deletions authorization-code/client/public/styles.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:root {
/* Color Variables */
--primary-color: #007bff;
--secondary-color: #6c757d;
--primary-color: #000000;
--secondary-color: #808080;
--danger-color: #dc3545;
--success-color: #28a745;
--white: #ffffff;
Expand Down
2 changes: 1 addition & 1 deletion authorization-code/provider/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require("dotenv").config({ path: "../.env" });
require("dotenv").config();
const bodyParser = require("body-parser");
const cors = require("cors");
const express = require("express");
Expand Down