codesandbox / codesandbox/codesandbox-client
Embed need sign in after refresh the window
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
🐛 bug report
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project
adheres to. - I have searched the issue tracker for an issue that matches the one I want
to file, without success.
Description of the problem
I embed a cloud sandbox project. But it needs to sign in every times after refresh the window.
Here's a demo: https://codesandbox-embed.vercel.app/
And I found a problem about the /auth/jwt api. In iframe this api was 401 error, and maybe there is something wrong with the cookie:
How has this issue affected you? What are you trying to accomplish?
That's a great inconvenience. I wanna sign in just one time and it can keep my auth.
To Reproduce
Link to sandbox: link (optional)
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | Web cloud sandbox |
| Browser | Chrome v114 / Edge v114 |
| Operating System | Windows10 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox embed demo and inspect the /auth/jwt request in the iframe using Chrome or Edge developer tools. Check the cookie behavior across a window refresh. Done when the embedded project stays signed in after refresh and the authentication request no longer returns 401.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, authentication, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100