Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b1f75b3ee2 | |||
| f3392eff9f |
@@ -86,7 +86,7 @@ app.get('/auth/token', (req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const accessToken = req.oidc.accessToken?.access_token;
|
const accessToken = req.oidc.accessToken?.access_token;
|
||||||
const expiresAt = req.oidc.accessToken?.expires_at;
|
const expiresAt = req.oidc.accessToken?.expires_in;
|
||||||
if (!accessToken) {
|
if (!accessToken) {
|
||||||
res.status(500).json({ error: 'no access token in session' });
|
res.status(500).json({ error: 'no access token in session' });
|
||||||
return;
|
return;
|
||||||
@@ -95,7 +95,7 @@ app.get('/auth/token', (req, res) => {
|
|||||||
res.json({
|
res.json({
|
||||||
access_token: accessToken,
|
access_token: accessToken,
|
||||||
token_type: 'Bearer',
|
token_type: 'Bearer',
|
||||||
expires_at: expiresAt,
|
expires_in: expiresAt,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ app.get('/auth/logout', (req, res) => {
|
|||||||
// Production: serve Vite-built client as static files
|
// Production: serve Vite-built client as static files
|
||||||
const clientDist = path.resolve(import.meta.dirname, '../../client/dist');
|
const clientDist = path.resolve(import.meta.dirname, '../../client/dist');
|
||||||
app.use(express.static(clientDist));
|
app.use(express.static(clientDist));
|
||||||
app.get('*', (_req, res) => {
|
app.get('/{*path}', (_req, res) => {
|
||||||
res.sendFile(path.join(clientDist, 'index.html'));
|
res.sendFile(path.join(clientDist, 'index.html'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user