We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Dear Sir. How to implement testing user authention with send create cookie. I use express-session and I do this:
test.only("When signed in , shows logout button", async ()=>{ const cookieSignature = require('cookie-signature'); const { Buffer } = require('safe-buffer'); const keys = require('../config/keys'); const id = "64732491418fea82e9d214e1"; const sessionObject = { passport: { user: id } }; const cookie = require('cookie') const sessionString = JSON.stringify(sessionObject); const signature = "s:"+cookieSignature.sign(Buffer.from(sessionString).toString('base64'), keys.cookieKey); var data = cookie.serialize('connect.sid', signature); await page.setCookie({name: "connect.sid", value: data.split('=')[1]}); await page.goto("http://localhost:3000"); })
Problem here creating sessionId and I cannot find any tutorial about this. Please help
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dear Sir. How to implement testing user authention with send create cookie. I use express-session and I do this:
Problem here creating sessionId and I cannot find any tutorial about this. Please help
The text was updated successfully, but these errors were encountered: