I tried to develop authrization with Google Oauth via sk-auth. sk-auth is library of SvelteKit like NextAuth.
If we wanna change redirect url from https to http, we can use below code.
export const appAuth = new SvelteKitAuth({
// We can change that by protocol property.
protocol: 'http',
jwtSecret: import.meta.env.VITE_JWT_SECRET,
providers: [
new Providers.GoogleOAuth2Provider({
clientId: import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_ID,
clientSecret: import.meta.env.VITE_GOOGLE_OAUTH_CLIENT_SECRET,
profile(profile) {
return { ...profile, provider: 'google' };
},
})
],
});
Top comments (0)