Debian Codegraph @

allauth/headless/socialaccount/urls.py

raw
1 from __future__ import annotations
2
3 from django.urls import URLPattern, URLResolver, include, path
4
5 from allauth.headless.constants import Client
6 from allauth.headless.socialaccount import views
7
8
9 def build_urlpatterns(client: Client) -> list[URLPattern | URLResolver]:
10 return [
11 path(
12 "account/",
13 include(
14 [
15 path(
16 "providers",
17 views.ManageProvidersView.as_api_view(client=client),
18 name="manage_providers",
19 ),
20 ]
21 ),
22 ),
23 path(
24 "auth/",
25 include(
26 [
27 path(
28 "provider/",
29 include(
30 [
31 path(
32 "signup",
33 views.ProviderSignupView.as_api_view(client=client),
34 name="provider_signup",
35 ),
36 path(
37 "redirect",
38 views.RedirectToProviderView.as_api_view(
39 client=client
40 ),
41 name="redirect_to_provider",
42 ),
43 path(
44 "token",
45 views.ProviderTokenView.as_api_view(client=client),
46 name="provider_token",
47 ),
48 ]
49 ),
50 )
51 ]
52 ),
53 ),
54 ]