prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Google logins broken with django-allauth 0.62+
  # Recipe
  
  - Open incognito window (just in case it matters)
  - Navigate to grand-challenge.org
  - Click Third party auth -> Google to login
   
  ![image](https://github.com/comic/grand-challenge.org/assets/11632379/c699412c-c522-4c78-a86b-df9ba27b66cb)
  
  - Acknowledge that you are sent to a "third party" by clicking continue on the next page.
  
  ![image](https://github.com/comic/grand-challenge.org/assets/11632379/b361b622-4065-4fa8-ac7e-9c3ecf72b12e)
  
  # Result
  
  ![image](https://github.com/comic/grand-challenge.org/assets/11632379/f830f3d0-b3d9-4408-a37a-9b62f82c185e)
  
  > Unexpected Error
  
  No login possible.
  
  @amickan reported that no sentry errors are being recorded. I cannot login, presumably many other people cannot login either.
  
  
  </issue>
  <code>
  [start of app/grandchallenge/profiles/providers/gmail/views.py]
  1 from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter
  2 from allauth.socialaccount.providers.oauth2.views import (
  3     OAuth2CallbackView,
  4     OAuth2LoginView,
  5 )
  6 
  7 from grandchallenge.profiles.providers.gmail.provider import GmailProvider
  8 
  9 
  10 class GmailOAuth2Adapter(GoogleOAuth2Adapter):
  11     provider_id = GmailProvider.id
  12 
  13 
  14 oauth2_login = OAuth2LoginView.adapter_view(GmailOAuth2Adapter)
  15 oauth2_callback = OAuth2CallbackView.adapter_view(GmailOAuth2Adapter)
  16
  [end of app/grandchallenge/profiles/providers/gmail/views.py]
  [start of app/grandchallenge/profiles/providers/gmail/provider.py]
  1 from allauth.socialaccount.providers.google.provider import GoogleProvider
  2 
  3 
  4 class GmailProvider(GoogleProvider):
  5     id = "gmail"
  6     name = "Google"
  7 
  8     def extract_uid(self, data):
  9         return str(data["email"])
  10 
  11 
  12 provider_classes = [GmailProvider]
  13
  [end of app/grandchallenge/profiles/providers/gmail/provider.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/app/grandchallenge/profiles/providers/gmail/provider.py b/app/grandchallenge/profiles/providers/gmail/provider.py
  --- a/app/grandchallenge/profiles/providers/gmail/provider.py
  +++ b/app/grandchallenge/profiles/providers/gmail/provider.py
  @@ -1,9 +1,12 @@
   from allauth.socialaccount.providers.google.provider import GoogleProvider
   
  +from grandchallenge.profiles.providers.gmail.views import GmailOAuth2Adapter
  +
   
   class GmailProvider(GoogleProvider):
       id = "gmail"
       name = "Google"
  +    oauth2_adapter_class = GmailOAuth2Adapter
   
       def extract_uid(self, data):
           return str(data["email"])
  diff --git a/app/grandchallenge/profiles/providers/gmail/views.py b/app/grandchallenge/profiles/providers/gmail/views.py
  --- a/app/grandchallenge/profiles/providers/gmail/views.py
  +++ b/app/grandchallenge/profiles/providers/gmail/views.py
  @@ -4,11 +4,9 @@
       OAuth2LoginView,
   )
   
  -from grandchallenge.profiles.providers.gmail.provider import GmailProvider
  -
   
   class GmailOAuth2Adapter(GoogleOAuth2Adapter):
  -    provider_id = GmailProvider.id
  +    provider_id = "gmail"
   
   
   oauth2_login = OAuth2LoginView.adapter_view(GmailOAuth2Adapter)
  
verification_info: {"golden_diff": "diff --git a/app/grandchallenge/profiles/providers/gmail/provider.py b/app/grandchallenge/profiles/providers/gmail/provider.py\n--- a/app/grandchallenge/profiles/providers/gmail/provider.py\n+++ b/app/grandchallenge/profiles/providers/gmail/provider.py\n@@ -1,9 +1,12 @@\n from allauth.socialaccount.providers.google.provider import GoogleProvider\n \n+from grandchallenge.profiles.providers.gmail.views import GmailOAuth2Adapter\n+\n \n class GmailProvider(GoogleProvider):\n     id = \"gmail\"\n     name = \"Google\"\n+    oauth2_adapter_class = GmailOAuth2Adapter\n \n     def extract_uid(self, data):\n         return str(data[\"email\"])\ndiff --git a/app/grandchallenge/profiles/providers/gmail/views.py b/app/grandchallenge/profiles/providers/gmail/views.py\n--- a/app/grandchallenge/profiles/providers/gmail/views.py\n+++ b/app/grandchallenge/profiles/providers/gmail/views.py\n@@ -4,11 +4,9 @@\n     OAuth2LoginView,\n )\n \n-from grandchallenge.profiles.providers.gmail.provider import GmailProvider\n-\n \n class GmailOAuth2Adapter(GoogleOAuth2Adapter):\n-    provider_id = GmailProvider.id\n+    provider_id = \"gmail\"\n \n \n oauth2_login = OAuth2LoginView.adapter_view(GmailOAuth2Adapter)\n", "issue": "Google logins broken with django-allauth 0.62+\n# Recipe\r\n\r\n- Open incognito window (just in case it matters)\r\n- Navigate to grand-challenge.org\r\n- Click Third party auth -> Google to login\r\n \r\n![image](https://github.com/comic/grand-challenge.org/assets/11632379/c699412c-c522-4c78-a86b-df9ba27b66cb)\r\n\r\n- Acknowledge that you are sent to a \"third party\" by clicking continue on the next page.\r\n\r\n![image](https://github.com/comic/grand-challenge.org/assets/11632379/b361b622-4065-4fa8-ac7e-9c3ecf72b12e)\r\n\r\n# Result\r\n\r\n![image](https://github.com/comic/grand-challenge.org/assets/11632379/f830f3d0-b3d9-4408-a37a-9b62f82c185e)\r\n\r\n> Unexpected Error\r\n\r\nNo login possible.\r\n\r\n@amickan reported that no sentry errors are being recorded. I cannot login, presumably many other people cannot login either.\r\n\n", "before_files": [{"content": "from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter\nfrom allauth.socialaccount.providers.oauth2.views import (\n    OAuth2CallbackView,\n    OAuth2LoginView,\n)\n\nfrom grandchallenge.profiles.providers.gmail.provider import GmailProvider\n\n\nclass GmailOAuth2Adapter(GoogleOAuth2Adapter):\n    provider_id = GmailProvider.id\n\n\noauth2_login = OAuth2LoginView.adapter_view(GmailOAuth2Adapter)\noauth2_callback = OAuth2CallbackView.adapter_view(GmailOAuth2Adapter)\n", "path": "app/grandchallenge/profiles/providers/gmail/views.py"}, {"content": "from allauth.socialaccount.providers.google.provider import GoogleProvider\n\n\nclass GmailProvider(GoogleProvider):\n    id = \"gmail\"\n    name = \"Google\"\n\n    def extract_uid(self, data):\n        return str(data[\"email\"])\n\n\nprovider_classes = [GmailProvider]\n", "path": "app/grandchallenge/profiles/providers/gmail/provider.py"}]}