Dan6erbond / sk-auth

Authentication library for use with SvelteKit featuring built-in OAuth providers and zero restriction customization!
MIT License
578 stars 70 forks source link

Should this package be deprecated? #112

Open nofurtherinformation opened 1 year ago

nofurtherinformation commented 1 year ago

With the release of SvelteKit 1.0 and the revamp of NextAuth as Auth.js, should this package be deprecated in favor of @auth/sveltekit and @auth/core?

When I recently tried this library, it didn't seem to work with the recent breaking changes of SvelteKit, and while Auth.js is still experimental and unstable, it does work.

I'm mostly wondering for newcomers to SvelteKit if keeping this project active would cause more confusion and issues than directing folks elsewhere.

My thanks and huge kudos to all the contributors on this repo!

half2me commented 1 year ago

@nofurtherinformation thanks for mentioning Auth.js Back when sveltekit was still in beta (2 years ago) I had to write my own library to interface with cognito and make everything work properly. I'll be transitioning my app to use Auth.js soon.

manuganji commented 1 year ago

I have been struggling to get @auth/sveltekit and @auth/core to work for over a week now. The documentation is nearly non-existent. Not sure if that package is a good alternative either.

half2me commented 1 year ago

@manuganji Once I worked around a few bugs I found I got it to work quite well. The getSession() function they provide does not work properly, you have to make the call to /auth/session yourself, and then it works as expected

notramo commented 1 year ago

@Dan6erbond, what is the current status of the project?

Dan6erbond commented 1 year ago

Hey everyone, with the latest stable release of SvelteKit and Auth.js adding support for SvelteKit, I believe that the current version of SK-Auth should be deprecated. It was built while SvelteKit was still in alpha and had many breaking changes in the API since then.

I do however think, that there's potential for a rewrite of SK-Auth now, using a more modular architecture. I personally have never been a huge fan of Auth.js since it's quite limited beyond OIDC and username/password auth. If I get around to it, the v2 of SK-Auth will be a library that follows similar principles of v1, but an even heavier focus on writing your own auth logic to handle more complex scenarios, such as integrating with your own backend and writing your own flows.

I appreciate all the help I got from the community to build this library, and the chance it gave me to work with SvelteKit in its earlier stages, and I'm looking forward to the next major version!