mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 12:43:09 -05:00
🐛 (nordigen) close window when opening /nordigen/link path (#160)
When Nordigen accounts are linked 2x windows get opened: 1x (initial tab) is polling for the status; the other window is for authenticating with bank. Once the auth is done - customer is redirected back to app: `/nordigen/link` page. At this point we can just close the tab. https://github.com/actualbudget/actual/issues/724#issuecomment-1462853590
This commit is contained in:
committed by
GitHub
parent
184ec5f1c0
commit
1dd1283d56
@@ -1,4 +1,5 @@
|
||||
import express from 'express';
|
||||
import path from 'path';
|
||||
|
||||
import { nordigenService } from './services/nordigen-service.js';
|
||||
import {
|
||||
@@ -10,6 +11,10 @@ import { handleError } from './util/handle-error.js';
|
||||
import validateUser from '../util/validate-user.js';
|
||||
|
||||
const app = express();
|
||||
app.get('/link', function (req, res) {
|
||||
res.sendFile('link.html', { root: path.resolve('./src/app-nordigen') });
|
||||
});
|
||||
|
||||
export { app as handlers };
|
||||
app.use(express.json());
|
||||
app.use(async (req, res, next) => {
|
||||
|
||||
18
src/app-nordigen/link.html
Normal file
18
src/app-nordigen/link.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Actual</title>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.close();
|
||||
</script>
|
||||
|
||||
<p>Please wait...</p>
|
||||
<p>
|
||||
The window should close automatically. If nothing happened you can close
|
||||
this window or tab.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user