@@ -72,46 +72,88 @@ def get_website_domain():
7272 emailverification .init ("REQUIRED" ),
7373 thirdpartyemailpassword .init (
7474 providers = [
75- Google (
76- is_default = True ,
77- client_id = os .environ .get ("GOOGLE_CLIENT_ID" ), # type: ignore
78- client_secret = os .environ .get ("GOOGLE_CLIENT_SECRET" ), # type: ignore
75+ thirdpartyemailpassword .ProviderInput (
76+ config = thirdpartyemailpassword .ProviderConfig (
77+ third_party_id = "google" ,
78+ clients = [
79+ thirdpartyemailpassword .ProviderClientConfig (
80+ client_id = os .environ ["GOOGLE_CLIENT_ID" ],
81+ client_secret = os .environ ["GOOGLE_CLIENT_SECRET" ],
82+ ),
83+ thirdpartyemailpassword .ProviderClientConfig (
84+ client_id = os .environ ["GOOGLE_CLIENT_ID_MOBILE" ],
85+ client_secret = os .environ ["GOOGLE_CLIENT_SECRET_MOBILE" ],
86+ ),
87+ ],
88+ ),
7989 ),
80- Google (
81- client_id = os .environ .get ("GOOGLE_CLIENT_ID_MOBILE" ), # type: ignore
82- client_secret = os .environ .get ("GOOGLE_CLIENT_SECRET_MOBILE" ), # type: ignore
90+ thirdpartyemailpassword .ProviderInput (
91+ config = thirdpartyemailpassword .ProviderConfig (
92+ third_party_id = "github" ,
93+ clients = [
94+ thirdpartyemailpassword .ProviderClientConfig (
95+ client_id = os .environ ["GITHUB_CLIENT_ID" ],
96+ client_secret = os .environ ["GITHUB_CLIENT_SECRET" ],
97+ ),
98+ thirdpartyemailpassword .ProviderClientConfig (
99+ client_id = os .environ ["GITHUB_CLIENT_ID_MOBILE" ],
100+ client_secret = os .environ ["GITHUB_CLIENT_SECRET_MOBILE" ],
101+ ),
102+ ],
103+ )
83104 ),
84- Github (
85- is_default = True ,
86- client_id = os .environ .get ("GITHUB_CLIENT_ID" ), # type: ignore
87- client_secret = os .environ .get ("GITHUB_CLIENT_SECRET" ), # type: ignore
105+ # FIXME: Properly migrate apple provider
106+ # Apple(
107+ # is_default=True,
108+ # client_id=os.environ.get("APPLE_CLIENT_ID"), # type: ignore
109+ # client_key_id=os.environ.get("APPLE_KEY_ID"), # type: ignore
110+ # client_team_id=os.environ.get("APPLE_TEAM_ID"), # type: ignore
111+ # client_private_key=os.environ.get("APPLE_PRIVATE_KEY"), # type: ignore
112+ # ),
113+ # Apple(
114+ # client_id=os.environ.get("APPLE_CLIENT_ID_MOBILE"), # type: ignore
115+ # client_key_id=os.environ.get("APPLE_KEY_ID"), # type: ignore
116+ # client_team_id=os.environ.get("APPLE_TEAM_ID"), # type: ignore
117+ # client_private_key=os.environ.get("APPLE_PRIVATE_KEY"), # type: ignore
118+ # ),
119+ thirdpartyemailpassword .ProviderInput (
120+ config = thirdpartyemailpassword .ProviderConfig (
121+ third_party_id = "apple" ,
122+ clients = [
123+ thirdpartyemailpassword .ProviderClientConfig (
124+ client_id = os .environ ["APPLE_CLIENT_ID" ],
125+ client_secret = os .environ ["TODO" ], # TODO
126+ ),
127+ thirdpartyemailpassword .ProviderClientConfig (
128+ client_id = os .environ ["APPLE_CLIENT_ID_MOBILE" ],
129+ client_secret = os .environ ["TODO" ], # TODO
130+ ),
131+ ],
132+ )
88133 ),
89- Github (
90- client_id = os .environ .get ("GITHUB_CLIENT_ID_MOBILE" ), # type: ignore
91- client_secret = os .environ .get ("GITHUB_CLIENT_SECRET_MOBILE" ), # type: ignore
134+ thirdpartyemailpassword .ProviderInput (
135+ config = thirdpartyemailpassword .ProviderConfig (
136+ third_party_id = "googleworkspaces" ,
137+ clients = [
138+ thirdpartyemailpassword .ProviderClientConfig (
139+ client_id = os .environ ["GOOGLE_WORKSPACES_CLIENT_ID" ],
140+ client_secret = os .environ [
141+ "GOOGLE_WORKSPACES_CLIENT_SECRET"
142+ ],
143+ ),
144+ ],
145+ )
92146 ),
93- Apple (
94- is_default = True ,
95- client_id = os .environ .get ("APPLE_CLIENT_ID" ), # type: ignore
96- client_key_id = os .environ .get ("APPLE_KEY_ID" ), # type: ignore
97- client_team_id = os .environ .get ("APPLE_TEAM_ID" ), # type: ignore
98- client_private_key = os .environ .get ("APPLE_PRIVATE_KEY" ), # type: ignore
99- ),
100- Apple (
101- client_id = os .environ .get ("APPLE_CLIENT_ID_MOBILE" ), # type: ignore
102- client_key_id = os .environ .get ("APPLE_KEY_ID" ), # type: ignore
103- client_team_id = os .environ .get ("APPLE_TEAM_ID" ), # type: ignore
104- client_private_key = os .environ .get ("APPLE_PRIVATE_KEY" ), # type: ignore
105- ),
106- GoogleWorkspaces (
107- is_default = True ,
108- client_id = os .environ .get ("GOOGLE_WORKSPACES_CLIENT_ID" ), # type: ignore
109- client_secret = os .environ .get ("GOOGLE_WORKSPACES_CLIENT_SECRET" ), # type: ignore
110- ),
111- Discord (
112- is_default = True ,
113- client_id = os .environ .get ("DISCORD_CLIENT_ID" ), # type: ignore
114- client_secret = os .environ .get ("DISCORD_CLIENT_SECRET" ), # type: ignore
147+ thirdpartyemailpassword .ProviderInput (
148+ config = thirdpartyemailpassword .ProviderConfig (
149+ third_party_id = "discord" ,
150+ clients = [
151+ thirdpartyemailpassword .ProviderClientConfig (
152+ client_id = os .environ ["DISCORD_CLIENT_ID" ],
153+ client_secret = os .environ ["DISCORD_CLIENT_SECRET" ],
154+ ),
155+ ],
156+ )
115157 ),
116158 ]
117159 ),
0 commit comments