We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c7ce610 commit 1d95af3Copy full SHA for 1d95af3
src/runtime/server/lib/oauth/facebook.ts
@@ -88,7 +88,7 @@ export function defineOAuthFacebookEventHandler({
88
const redirectURL = config.redirectURL || getOAuthRedirectURL(event)
89
90
if (!query.code) {
91
- config.scope = config.scope || []
+ config.scope = [...new Set(config.scope)]
92
// Redirect to Facebook Oauth page
93
return sendRedirect(
94
event,
@@ -117,7 +117,7 @@ export function defineOAuthFacebookEventHandler({
117
const accessToken = tokens.access_token
118
// TODO: improve typing
119
120
- config.fields = config.fields || ['id', 'name']
+ config.fields = [...new Set(config.fields || ['id', 'name'])]
121
const fields = config.fields.join(',')
122
123
const user = await $fetch(
0 commit comments