Dan6erbond / sk-auth

Authentication library for use with SvelteKit featuring built-in OAuth providers and zero restriction customization!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Enhancement] Allows Http protocol configuration

ByronCobb opened this issue · comments

commented

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

commented

@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.

The protocol can be set when creating a SvelteKitAuth object.

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

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

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.