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