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

Relinquish OAuth responsibilities #19

Merged
merged 11 commits into from
Dec 14, 2021
Merged

Relinquish OAuth responsibilities #19

merged 11 commits into from
Dec 14, 2021

Conversation

Rich-Harris
Copy link
Member

#18

@Rich-Harris
Copy link
Member Author

I took the opportunity to tweak a couple of things — I kept getting confused about what uid meant in different contexts, so I moved towards more specific things like gistid, guestid, userid and so on. If that's a terrible decision we can revert, but I figured we're going to need to update the migration process anyway to remove some of these rough edges so now would be a good time to do this sort of thing.

Speaking of which, how does the migration work? Where does the script live? Should it be in this repo?

@Rich-Harris
Copy link
Member Author

Rich-Harris commented Dec 9, 2021

Made a decent amount of progress on here and sveltejs/sites#78 — you can log in, create gists, fork and save them.

But I think I've hit a bit of a roadblock with https://svelte.dev/apps. There's really no good way to paginate data in a KV store. We could fudge it, by slicing the array in the worker — would be fine in practice at the scales we're dealing with — but it sort of defeats the point of pagination. That, combined with the observation that we have to maintain a list of ownership separately from the gists themselves (synced non-transactionally), and the fact that there's no good way to periodically purge expired sessions, eventually forced me to conclude that we're just using the wrong tool for the job. KV is great for docs, but for gists/sessions/todos we need a relational database.

I'm going to investigate Supabase and see if it'll work for our needs.

@Rich-Harris
Copy link
Member Author

Supabase is working well on sveltejs/sites#78, so I've removed all the auth/gists stuff from here. Have left the todos stuff until the Kit template can be updated to also use Supabase

@Rich-Harris Rich-Harris marked this pull request as ready for review December 14, 2021 23:51
@Rich-Harris Rich-Harris merged commit 9ed5b3d into master Dec 14, 2021
@Rich-Harris Rich-Harris deleted the auth branch December 14, 2021 23:52
@Rich-Harris Rich-Harris mentioned this pull request Dec 14, 2021
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.

1 participant