simov / grant

OAuth Proxy
MIT License
4.08k stars 257 forks source link

Do you know an example of Grant setup in SvelteKit project? #274

Open stephane-klein opened 2 years ago

stephane-klein commented 2 years ago

Hi,

I want to configure an OAuth 2 authentication connected to self-hosted GitLab instance for a SvelteKit SSR project.

Here is my personnel exploration issue.

I try to use Grant library instead node-oauth or passport-oauth2

Question: do you know an example of Grant setup in SvelteKit project?

I intend to try to setup Grand in a SvelteKit hooks, based on https://github.com/simov/grant/blob/master/lib/handler/vercel.js source code :thinking:

Best regards,
Stéphane

simov commented 2 years ago

Is the SvelteKit supposed to have a server running? Last time I checked it was a purely browser framework. If it have it's own server then you basically need a Grant handler for it so that you can leverage everything already available in Grant.

stephane-klein commented 2 years ago

Is the SvelteKit supposed to have a server running?

@simov yes: SvelteKit

simov commented 2 years ago

Yes, I glanced at your commits and it seems like it is going to work. Generally speaking though, the design goal in Grant has always been to provide a minimal interface that works out of the box for all of the supported HTTP frameworks and Cloud providers. I do see how creating the handler for Grant might be an extra effort in your case.