chrome.identity.getAuthToken does not work even when disabling the security rule

Description of the issue: I am developing a chrome extension that needs to be able to allow google SSO. For this, I am grabbing the user’s email from chrome.identity and retrieving a user based on that. However, when attempting this on brave I get the attached page.

Error details say:

## Error 400: invalid_request

Custom URI scheme is not supported on Chrome apps.

Request details: flowName=GeneralOAuthFlow

Steps to Reproduce (add as many as necessary): 1. 2. 3.

      const token = await new Promise<string>((resolve, reject) => {
        chrome.identity.getAuthToken({ interactive: true }, function(token) {
          if (chrome.runtime.lastError || !token) {
            reject(chrome.runtime.lastError || new Error('Failed to get auth token'));
          } else {
            resolve(token);
          }
        });
      });

Actual Result (gifs and screenshots are welcome!):

Expected result: Access token retrieved from the browser

Reproduces how often: Every time.

Operating System and Brave Version(See the About Brave page in the main menu): Linux pop-os 6.9.3-76060903-generic /
Version 1.70.126 Chromium: 129.0.6668.100 (Official Build) (64-bit)

Additional Information:
This works perfectly fine on chrome. I have also already enabled “Allow Google login for Extensions”