Add debug logging to see received auth data
This commit is contained in:
7
app.js
7
app.js
@@ -209,6 +209,13 @@ app.post('/complete-auth/:sessionId', async (req, res) => {
|
||||
const { sessionId } = req.params;
|
||||
const { npub, event_json } = req.body;
|
||||
|
||||
console.log('🐛 DEBUG - Received data:', {
|
||||
sessionId,
|
||||
npub: npub ? `"${npub}" (length: ${npub.length})` : 'undefined',
|
||||
event_json: event_json ? `${event_json.substring(0, 100)}... (length: ${event_json.length})` : 'undefined',
|
||||
allKeys: Object.keys(req.body)
|
||||
});
|
||||
|
||||
const session = sessions.get(sessionId);
|
||||
if (!session) {
|
||||
throw new Error('Session not found or expired');
|
||||
|
||||
Reference in New Issue
Block a user