prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN 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.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `app/grandchallenge/profiles/providers/gmail/views.py`
  Content:
  ```
  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
  ```
  
  Path: `app/grandchallenge/profiles/providers/gmail/provider.py`
  Content:
  ```
  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 FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
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"}], "after_files": [{"content": "from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter\nfrom allauth.socialaccount.providers.oauth2.views import (\n    OAuth2CallbackView,\n    OAuth2LoginView,\n)\n\n\nclass GmailOAuth2Adapter(GoogleOAuth2Adapter):\n    provider_id = \"gmail\"\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\nfrom grandchallenge.profiles.providers.gmail.views import GmailOAuth2Adapter\n\n\nclass 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\"])\n\n\nprovider_classes = [GmailProvider]\n", "path": "app/grandchallenge/profiles/providers/gmail/provider.py"}]}