Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
573 views
in Technique[技术] by (71.8m points)

Cant get token from B2C / Azure AD (Active Directory) - Local Storage & Session Storage are empty [Cypress / Puppeteer]

So, I run tests on Cypress, but my company now decided to switch to B2C Azure AD , so now my login automated test on cypress doesnt work anymore. Therefore, I went to my google friend to search for solutions, and most people seems to recommend using puppeteer to grab the login token and return it to cypress, so that it can resume the next tests.

The problem, however, is that on Local Storage or Session Storage (tab "Application" of the devtools), at no moment there is any "key" or "value", so there is never any token there - Not before the login, not during the login, not after the login. They are always empty. From all examples I saw, people always grab the token from Local Storage.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...