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

wip: feat: discord provider #71

Closed alexstaroselsky closed 2 years ago

alexstaroselsky commented 2 years ago

Add discord oauth2 provider https://discord.com/developers/docs/topics/oauth2

alexstaroselsky commented 2 years ago

Marking as WIP/draft as having issue running ./app locally due to sveltekit breaking changes with request object.

Dan6erbond commented 2 years ago

You should be able to finish the implementation of this provider now that I've merged #69! Thank you for everyone's patience!

tascodes commented 2 years ago

@alexstaroselsky Is there anything left to add to this? Would love to see this provider make it in!

alexstaroselsky commented 2 years ago

@dwagio Trying, but getting a lot of different errors and warnings try to build or run app/, even after syncing upstream. Making difficult, if not impossible to validate the newly added logic.

tascodes commented 2 years ago

Looks like there's been a ton of breaking changes in SvelteKit that actually has broken the main branch here, too.

tascodes commented 2 years ago

PR created: https://github.com/Dan6erbond/sk-auth/pull/81

I'm not 100% certain this fixes everything but that's just because I'm having trouble configuring the needed environment variables and getting HTTPS working. As far as I can tell it works up to the point of callback.

vhscom commented 2 years ago

Left feedback in #81. I think @alexstaroselsky stopped because they're still blocked by app errors. Alexander, is there a specific error you need help getting past so we can wrap this up and get it merge-ready?

alexstaroselsky commented 2 years ago

Yes, I'm trying to avoid possibly wasting any time trying to resolve the conflicts/issues until they have been reasonably resolved.

vhscom commented 2 years ago

Yes, I'm trying to avoid possibly wasting any time trying to resolve the conflicts/issues until they have been reasonably resolved.

Got it. I've got a clean build of SK Auth running on the latest version of SvelteKit with an example GitHub implementation here if you're interested in sending up a pull to my fork so we can unblock your provider addition. If not, that's okay too.

alexstaroselsky commented 2 years ago

@vhscom It would still depend on this repo's PR such as https://github.com/Dan6erbond/sk-auth/pull/81 and any other related ones being completed to actually get this discord provider feature in effectively right? If you prefer, I can close this PR and you can take over this feature.

vhscom commented 2 years ago

I've addressed #81 in the fork plus more recent changes to SvelteKit which change those changes. If you considered the starter I linked the app here, you have a playground to test your provider without friction. Getting it merged with SK Auth afterwards would be a 2-line refactoring when you're finished all else being equal.

alexstaroselsky commented 2 years ago

I unfortunately do not have the time the properly focus on this feature. I'm going to close this PR and anyone interested in driving this feature home is more than welcome to use or not use anything introduced in this PR. Thanks!