-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
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
docs: add auth and context #112
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
=======================================
Coverage ? 76.23%
=======================================
Files ? 9
Lines ? 711
Branches ? 145
=======================================
Hits ? 542
Misses ? 167
Partials ? 2 ☔ View full report in Codecov by Sentry. |
Thanks @sandros94, this gave me some much needed guidance! However, I found that setting the context to an object doesn't work, you have to set specific properties. For example (using Trying to set upgrade(request) {
request.context = { data: 'test'}
},
open(peer) {
console.log(peer.context) // logs {}
} Setting a specific property in upgrade(request) {
request.context.data = 'test'
},
open(peer) {
console.log(peer.context) // logs { data: 'test' }
} |
Co-authored-by: Travis Reynolds <[email protected]>
@travis-r6s thanks for reporting it! Indeed context is already initialized 😅 |
Good point @travis-r6s ~> #115 |
Resolves #88
Should I also add an auth example via cookie?
I might need some help on the
ok: false
backward compatible thing