File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,14 @@ export const createAuthorizeEndpoint = (
2020
2121 const responseType = "code" ;
2222 const accessType = "offline" ;
23- const authorizeUrl = `${ pluginOptions . providerAuthorizationUrl } ?client_id=${ clientId } &redirect_uri=${ redirectUri } &scope=${ scope } &response_type=${ responseType } &access_type=${ accessType } ${ prompt } ` ;
23+
24+
25+ // Add response_mode if specified
26+ const responseMode = pluginOptions . responseMode
27+ ? `&response_mode=${ pluginOptions . responseMode } `
28+ : ''
29+
30+ const authorizeUrl = `${ pluginOptions . providerAuthorizationUrl } ?client_id=${ clientId } &redirect_uri=${ redirectUri } &scope=${ scope } &response_type=${ responseType } &access_type=${ accessType } ${ prompt } ${ responseMode } ` ;
2431
2532 return Response . redirect ( authorizeUrl ) ;
2633 } ,
Original file line number Diff line number Diff line change @@ -27,6 +27,16 @@ export interface PluginTypes {
2727 */
2828 serverURL : string ;
2929
30+ /**
31+ * Response mode for the OAuth provider.
32+ * Required for Apple OAuth when requesting name or email scope.
33+ * Common values:
34+ * - 'form_post': Response parameters encoded in POST body (required for Apple with name/email scope)
35+ * - 'query': Response parameters encoded in URL query string
36+ * @default undefined
37+ */
38+ responseMode ?: string
39+
3040 /**
3141 * Slug of the collection where user information will be stored
3242 * @default "users"
You can’t perform that action at this time.
0 commit comments