Skip to content
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

Cache Ably auth-cookie #88

Merged
merged 13 commits into from Dec 15, 2023
Merged

Conversation

pavkam
Copy link
Contributor

@pavkam pavkam commented Dec 12, 2023

@pavkam pavkam self-assigned this Dec 12, 2023
@roncohen
Copy link
Contributor

how about also skipping calls to our ingest if we just did those calls? (non-spa apps)

@pavkam
Copy link
Contributor Author

pavkam commented Dec 12, 2023

how about also skipping calls to our ingest if we just did those calls? (non-spa apps)

This one avoids one call to Ingest and one to Ably. One more call remains - is the prompt-init. I guess we can avoid it as well indeed. Let me see what I can do.

@pavkam
Copy link
Contributor Author

pavkam commented Dec 12, 2023

how about also skipping calls to our ingest if we just did those calls? (non-spa apps)

Done, this should avoid the init call as well now.

src/main.ts Show resolved Hide resolved
@pavkam pavkam requested a review from rrpff December 13, 2023 10:25
Copy link
Contributor

@Munter Munter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change the getAuthToken interface to never throw and instead just return undefined in the case of an invalid cookie payload

test/usage.test.ts Outdated Show resolved Hide resolved
src/prompt-storage.ts Outdated Show resolved Hide resolved
src/sse.ts Show resolved Hide resolved
src/main.ts Show resolved Hide resolved
test/usage.test.ts Outdated Show resolved Hide resolved
pavkam and others added 2 commits December 15, 2023 15:14
Co-authored-by: Peter Müller <peter@bucket.co>
@pavkam pavkam merged commit f536248 into main Dec 15, 2023
5 checks passed
@pavkam pavkam deleted the buc-1702-investigate-ably-connection-management branch December 15, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants