Skip to content

Commit 219e0f3

Browse files
committed
feat: Update examples to have client type
1 parent e62882a commit 219e0f3

File tree

3 files changed

+21
-3
lines changed
  • examples
    • with-django/with-thirdpartyemailpassword/project
    • with-fastapi/with-thirdpartyemailpassword
    • with-flask/with-thirdpartyemailpassword

3 files changed

+21
-3
lines changed

examples/with-django/with-thirdpartyemailpassword/project/settings.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ def get_website_domain():
7272
thirdpartyemailpassword.ProviderClientConfig(
7373
client_id=os.environ["GOOGLE_CLIENT_ID"],
7474
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
75+
client_type="web",
7576
),
7677
thirdpartyemailpassword.ProviderClientConfig(
7778
client_id=os.environ["GOOGLE_CLIENT_ID_MOBILE"],
7879
client_secret=os.environ["GOOGLE_CLIENT_SECRET_MOBILE"],
80+
client_type="mobile",
7981
),
8082
],
8183
),
@@ -87,10 +89,12 @@ def get_website_domain():
8789
thirdpartyemailpassword.ProviderClientConfig(
8890
client_id=os.environ["GITHUB_CLIENT_ID"],
8991
client_secret=os.environ["GITHUB_CLIENT_SECRET"],
92+
client_type="web",
9093
),
9194
thirdpartyemailpassword.ProviderClientConfig(
9295
client_id=os.environ["GITHUB_CLIENT_ID_MOBILE"],
9396
client_secret=os.environ["GITHUB_CLIENT_SECRET_MOBILE"],
97+
client_type="mobile",
9498
),
9599
],
96100
)
@@ -101,6 +105,7 @@ def get_website_domain():
101105
clients=[
102106
thirdpartyemailpassword.ProviderClientConfig(
103107
client_id=os.environ["APPLE_CLIENT_ID"],
108+
client_type="web",
104109
additional_config={
105110
"keyId": os.environ["APPLE_KEY_ID"],
106111
"teamId": os.environ["APPLE_TEAM_ID"],
@@ -109,6 +114,7 @@ def get_website_domain():
109114
),
110115
thirdpartyemailpassword.ProviderClientConfig(
111116
client_id=os.environ["APPLE_CLIENT_ID_MOBILE"],
117+
client_type="mobile",
112118
additional_config={
113119
"keyId": os.environ["APPLE_KEY_ID"],
114120
"teamId": os.environ["APPLE_TEAM_ID"],
@@ -120,7 +126,7 @@ def get_website_domain():
120126
),
121127
thirdpartyemailpassword.ProviderInput(
122128
config=thirdpartyemailpassword.ProviderConfig(
123-
third_party_id="googleworkspaces",
129+
third_party_id="google-workspaces",
124130
clients=[
125131
thirdpartyemailpassword.ProviderClientConfig(
126132
client_id=os.environ["GOOGLE_WORKSPACES_CLIENT_ID"],

examples/with-fastapi/with-thirdpartyemailpassword/main.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@ def get_website_domain():
6363
thirdpartyemailpassword.ProviderClientConfig(
6464
client_id=os.environ["GOOGLE_CLIENT_ID"],
6565
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
66+
client_type="web",
6667
),
6768
thirdpartyemailpassword.ProviderClientConfig(
6869
client_id=os.environ["GOOGLE_CLIENT_ID_MOBILE"],
6970
client_secret=os.environ["GOOGLE_CLIENT_SECRET_MOBILE"],
71+
client_type="mobile",
7072
),
7173
],
7274
),
@@ -78,10 +80,12 @@ def get_website_domain():
7880
thirdpartyemailpassword.ProviderClientConfig(
7981
client_id=os.environ["GITHUB_CLIENT_ID"],
8082
client_secret=os.environ["GITHUB_CLIENT_SECRET"],
83+
client_type="web",
8184
),
8285
thirdpartyemailpassword.ProviderClientConfig(
8386
client_id=os.environ["GITHUB_CLIENT_ID_MOBILE"],
8487
client_secret=os.environ["GITHUB_CLIENT_SECRET_MOBILE"],
88+
client_type="mobile",
8589
),
8690
],
8791
)
@@ -92,6 +96,7 @@ def get_website_domain():
9296
clients=[
9397
thirdpartyemailpassword.ProviderClientConfig(
9498
client_id=os.environ["APPLE_CLIENT_ID"],
99+
client_type="web",
95100
additional_config={
96101
"keyId": os.environ["APPLE_KEY_ID"],
97102
"teamId": os.environ["APPLE_TEAM_ID"],
@@ -100,6 +105,7 @@ def get_website_domain():
100105
),
101106
thirdpartyemailpassword.ProviderClientConfig(
102107
client_id=os.environ["APPLE_CLIENT_ID_MOBILE"],
108+
client_type="mobile",
103109
additional_config={
104110
"keyId": os.environ["APPLE_KEY_ID"],
105111
"teamId": os.environ["APPLE_TEAM_ID"],
@@ -111,7 +117,7 @@ def get_website_domain():
111117
),
112118
thirdpartyemailpassword.ProviderInput(
113119
config=thirdpartyemailpassword.ProviderConfig(
114-
third_party_id="googleworkspaces",
120+
third_party_id="google-workspaces",
115121
clients=[
116122
thirdpartyemailpassword.ProviderClientConfig(
117123
client_id=os.environ["GOOGLE_WORKSPACES_CLIENT_ID"],

examples/with-flask/with-thirdpartyemailpassword/app.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ def get_website_domain():
5555
thirdpartyemailpassword.ProviderClientConfig(
5656
client_id=os.environ["GOOGLE_CLIENT_ID"],
5757
client_secret=os.environ["GOOGLE_CLIENT_SECRET"],
58+
client_type="web",
5859
),
5960
thirdpartyemailpassword.ProviderClientConfig(
6061
client_id=os.environ["GOOGLE_CLIENT_ID_MOBILE"],
6162
client_secret=os.environ["GOOGLE_CLIENT_SECRET_MOBILE"],
63+
client_type="mobile",
6264
),
6365
],
6466
),
@@ -70,10 +72,12 @@ def get_website_domain():
7072
thirdpartyemailpassword.ProviderClientConfig(
7173
client_id=os.environ["GITHUB_CLIENT_ID"],
7274
client_secret=os.environ["GITHUB_CLIENT_SECRET"],
75+
client_type="web",
7376
),
7477
thirdpartyemailpassword.ProviderClientConfig(
7578
client_id=os.environ["GITHUB_CLIENT_ID_MOBILE"],
7679
client_secret=os.environ["GITHUB_CLIENT_SECRET_MOBILE"],
80+
client_type="mobile",
7781
),
7882
],
7983
)
@@ -84,6 +88,7 @@ def get_website_domain():
8488
clients=[
8589
thirdpartyemailpassword.ProviderClientConfig(
8690
client_id=os.environ["APPLE_CLIENT_ID"],
91+
client_type="web",
8792
additional_config={
8893
"keyId": os.environ["APPLE_KEY_ID"],
8994
"teamId": os.environ["APPLE_TEAM_ID"],
@@ -92,6 +97,7 @@ def get_website_domain():
9297
),
9398
thirdpartyemailpassword.ProviderClientConfig(
9499
client_id=os.environ["APPLE_CLIENT_ID_MOBILE"],
100+
client_type="mobile",
95101
additional_config={
96102
"keyId": os.environ["APPLE_KEY_ID"],
97103
"teamId": os.environ["APPLE_TEAM_ID"],
@@ -103,7 +109,7 @@ def get_website_domain():
103109
),
104110
thirdpartyemailpassword.ProviderInput(
105111
config=thirdpartyemailpassword.ProviderConfig(
106-
third_party_id="googleworkspaces",
112+
third_party_id="google-workspaces",
107113
clients=[
108114
thirdpartyemailpassword.ProviderClientConfig(
109115
client_id=os.environ["GOOGLE_WORKSPACES_CLIENT_ID"],

0 commit comments

Comments
 (0)