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

[Enhancement] Allows Http protocol configuration #61

Open ByronCobb opened 2 years ago

ByronCobb commented 2 years ago

First off, thank you for this library, it works great. I deployed this to an app I am working on and noticed that although I am running on https, I was being redirected back to http

I've temporarily created a fork to get around this. This is what I have done for now image

ByronCobb commented 2 years ago

@Dan6erbond I can open a PR with my changes, but I don't feel I know the wider scope of the code so I'm not sure if this simple config is the right thing overall.

moreorover commented 2 years ago

The protocol can be set when creating a SvelteKitAuth object.

export const appAuth: SvelteKitAuth = new SvelteKitAuth({ providers: [oauthProvider], protocol: 'http' });

moreorover commented 2 years ago

Apologies, this has been fixed quite a while ago. Perhaps this should be closed?

vhscom commented 2 years ago

I had some issues related to scheme and ended up monkeypatching getCallbackUri. If this would address that code smell, I'm of the mind this should be left open for visibility.