Add Custom Scope Permissions
-
Hello all, I am trying to add custom scopes to the google registration process.
I have everything set up properly in google console. I know this because when using the plugin “login with google” I am able to use the following code to create a custom plugin that piggybacks off the “login with google” plugin and it requests additional scope permissions from users.
<?php /** * Plugin Name: Custom Google Login * Description: A custom plugin to extend the "Login with Google" plugin by adding additional scopes. * Version: 1.0 * Author: DB_Looper */ if (!defined('ABSPATH')) { exit; } function custom_google_login_add_scopes($scopes) { $additional_scopes = array( 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/spreadsheets', ); return array_merge($scopes, $additional_scopes); } add_filter('nextend_social_login_google_scopes', 'custom_google_login_add_scopes');
However, no matter what I try, I cannot figure out how to get anything similar working with Nextend.
I’m using Nextend because I couldn’t get the access token from the login with google plugin. But now I can get the scopes requests to work.
Anyone have any advice on how to fix this delima?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Add Custom Scope Permissions’ is closed to new replies.