Skip to content

Commit 166dd79

Browse files
committed
Quick fix for OAuth2 OOB deprecation - provide explicit callback and respond to user with token
* see greghesp#272) * see https://developers.google.com/identity/protocols/oauth2/resources/oob-migration * IMPORTANT: Make sure your credentials have the property `"redirect_uris":["http://your-relay-server-hostname:your-relay-server-port/auth/callback"]}`
1 parent ecf31ac commit 166dd79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

relay/routes/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ const router = express.Router();
1212

1313

1414
router.get('/', function(req, res) {
15-
console.log("Get All")
15+
console.log("Get All");
1616
res.sendFile(path.join(__dirname, '../views', 'index.html'));
1717
});
1818

19+
router.get('/auth/callback', function(req, res) {
20+
res.status(200).json(req.query);
21+
});
22+
1923
router.post('/assistant', async(req, res) => {
2024
try {
2125
const db = await low(adapter);

0 commit comments

Comments
 (0)