@astro-auth/providers
Version:
The providers package of the Astro Auth library
23 lines (22 loc) • 725 B
JavaScript
const InstagramProvider = (options) => {
return {
id: "instagram",
name: "Instagram",
type: "oauth",
scope: "user_profile",
options,
authorization: "https://api.instagram.com/oauth/authorize",
token: "https://api.instagram.com/oauth/access_token",
userinfo: "https://graph.instagram.com/me?fields=id,username,account_type,name",
profile(profile) {
return {
id: profile.id,
name: profile.username,
email: null,
image: null,
originalUser: Object.assign({}, profile),
};
},
};
};
export default InstagramProvider;