1from plain.urls import Router, include, path
2
3from . import views
4
5
6class OAuthRouter(Router):
7 namespace = "oauth"
8 urls = [
9 include(
10 "<str:provider>/",
11 [
12 # Login and Signup are both handled here, because the intent is the same
13 path("login/", views.OAuthLoginView, name="login"),
14 path("connect/", views.OAuthConnectView, name="connect"),
15 path(
16 "disconnect/",
17 views.OAuthDisconnectView,
18 name="disconnect",
19 ),
20 path("callback/", views.OAuthCallbackView, name="callback"),
21 ],
22 ),
23 ]