@astro-auth/providers
Version:
The providers package of the Astro Auth library
23 lines (22 loc) • 659 B
JavaScript
const GoogleProvider = (options) => {
return {
id: "google",
name: "Google",
type: "oauth",
scope: "openid email profile",
options,
wellKnown: "https://accounts.google.com/.well-known/openid-configuration",
idToken: true,
checks: ["pkce", "state"],
profile(profile) {
return {
id: profile.sub,
name: profile.name,
email: profile.email,
image: profile.picture,
originalUser: Object.assign({}, profile),
};
},
};
};
export default GoogleProvider;