TK
Posted on July 17, 2022
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' };
},
})
],
});
💖 💪 🙅 🚩
TK
Posted on July 17, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.