Closed JohnRSim closed 1 year ago
Ok 2 things:
I understand ;) - Keep up the great work! Just setup your sveltekit example and playing with it now with github / Prisma ;)
I'll take a look at using SK-Auth approach using this twitter-api-v2 package https://github.com/plhery/node-twitter-api-v2/blob/HEAD/doc/auth.md and tie it in with lucia createUser as a tmp quick solution :)
@pilcrowOnPaper Created a very, very rough gist example using twitter-api-v2 with sveltekit to handle the OAuth1. https://gist.github.com/JohnRSim/db5c8378707e8ab7011a956ffeab1115
Let me know if you see any issue with this - thanks :)
Does cookies.delete()
work? I've heard you need to specify the route, Other than that, looks good to me.
Yup cookies.delete works I had to change the cookies path on set from / to active path. It's deleting fine when I check chrome console.
Great - so far everything's working smoothly the only thing that caught me out as I'm new the prisma is when updating the schema having to run push db otherwise I get errors in prisma studio.
Ok I tried to do this again, but it was such a pain in the ass to do and gave up. I did make sure it was possible to add this without a breaking change so I'll tackle this post-1.0.
What about Twitter OAuth 2.0 would that be more straight forward?
OAuth 2.0 (likely) would be much easier
Do you think it make sense to have two providers then? One for 1.0 and one for 2.0.
I ask this cause I'm eager to try lucia out. I can technically write my own Twitter provider, but it seems that the most of the utils needed to write a provider are not exported?
Any update here on using Twitter OAuth 2?
This may be unpopular, but I've decided to not implement Twitter OAuth 1.0a. It's an archaic spec that has been deprecated over 10 years ago. I do not think it's worth the effort to add and maintain an OAuth 1.0a implementation, especially to support just one (admittedly large) provider. We are not supporting CJS for the same reasons.
That said, I'm planning to add Twitter OAuth 2.0 with PKCE.
Package
lucia-auth
Describe the problem
Previously I was using SvelteKit Auth
The issue is - "OAuth 2.0 can only be used with the Twitter API v2."
The problem with this is that the twitter v2 API's still only has limited support for all the features
Some examples of limitations with v2 that you can only do with v1 -
media upload user email retrieval activity api bookmark api
Describe the proposed solution
It would be great to be able to use Lucia-auth with a built in Twitter provider.
Alternatives considered
Looking at SK-Auth SK-Auth
or
Supabase https://supabase.com/docs/guides/auth/auth-helpers/sveltekit https://github.com/supabase/auth-helpers/tree/main/packages/sveltekit
Additional information
Unfortunately with Supabase and the twitter provider - you cannot get access to secret token returned by Twitter.
No response