fix: Add Microsoft Edge support for Google Drive sign-in #265
      
        
          +97
        
        
          −24
        
        
          
        
      
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Fix: Add Microsoft Edge support for Google Drive sign-in
Description
This PR fixes the Google Drive sign-in functionality for Microsoft Edge users. The current implementation uses
chrome.identity.getAuthToken()which is not supported in Microsoft Edge, causing sign-in failures with the error:Changes Made
1.
src/pages/Background/modules/signIn.jsnavigator.userAgent.includes('Edg')chrome.identity.getAuthToken()chrome.identity.launchWebAuthFlow()with manual OAuth2 flow2.
src/pages/Background/modules/saveToDrive.jssignIn()function for Edge token refreshTechnical Details
The fix implements the OAuth2 implicit flow for Edge:
560517327251-m7n1k3kddknu7s9s4ejvrs1bj91gutd7.apps.googleusercontent.comhttps://kbbdabhdfibnancpjfhlkhafgdilcnji.chromiumapp.org/https://www.googleapis.com/auth/drive.fileFor this fix to work, the following redirect URI must be added to the OAuth 2.0 Client ID in Google Cloud Console:
Steps to add the redirect URI:
https://kbbdabhdfibnancpjfhlkhafgdilcnji.chromiumapp.org/Testing
Tested on:
Test Steps:
Compatibility
This fix maintains backward compatibility:
Issue Reference
Fixes #266 - Google Drive sign-in fails on Microsoft Edge
Checklist