Skip to content

Commit 61267dd

Browse files
committed
Add dashboard init to all example apps
1 parent eebbc0f commit 61267dd

File tree

3 files changed

+13
-5
lines changed
  • examples
    • with-django/with-thirdpartyemailpassword/project
    • with-fastapi/with-thirdpartyemailpassword
    • with-flask/with-thirdpartyemailpassword

3 files changed

+13
-5
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@
1010
https://docs.djangoproject.com/en/4.0/ref/settings/
1111
"""
1212

13-
from pathlib import Path
1413
import os
15-
16-
from dotenv import load_dotenv
14+
from pathlib import Path
1715
from typing import List
16+
1817
from corsheaders.defaults import default_headers
18+
from dotenv import load_dotenv
19+
1920
from supertokens_python import (
2021
InputAppInfo,
2122
SupertokensConfig,
2223
get_all_cors_headers,
2324
init,
2425
)
2526
from supertokens_python.recipe import (
27+
dashboard,
28+
emailverification,
2629
session,
2730
thirdpartyemailpassword,
28-
emailverification,
2931
)
3032
from supertokens_python.recipe.thirdpartyemailpassword import (
3133
Apple,
@@ -66,6 +68,7 @@ def get_website_domain():
6668
mode="wsgi",
6769
recipe_list=[
6870
session.init(),
71+
dashboard.init(),
6972
emailverification.init("REQUIRED"),
7073
thirdpartyemailpassword.init(
7174
providers=[

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from fastapi.responses import JSONResponse, PlainTextResponse
77
from starlette.exceptions import ExceptionMiddleware
88
from starlette.middleware.cors import CORSMiddleware
9+
910
from supertokens_python import (
1011
InputAppInfo,
1112
SupertokensConfig,
@@ -14,9 +15,10 @@
1415
)
1516
from supertokens_python.framework.fastapi import get_middleware
1617
from supertokens_python.recipe import (
18+
dashboard,
19+
emailverification,
1720
session,
1821
thirdpartyemailpassword,
19-
emailverification,
2022
)
2123
from supertokens_python.recipe.session import SessionContainer
2224
from supertokens_python.recipe.session.framework.fastapi import verify_session
@@ -56,6 +58,7 @@ def get_website_domain():
5658
framework="fastapi",
5759
recipe_list=[
5860
session.init(),
61+
dashboard.init(),
5962
emailverification.init("REQUIRED"),
6063
thirdpartyemailpassword.init(
6164
providers=[

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
)
1313
from supertokens_python.framework.flask import Middleware
1414
from supertokens_python.recipe import (
15+
dashboard,
1516
emailverification,
1617
session,
1718
thirdpartyemailpassword,
@@ -50,6 +51,7 @@ def get_website_domain():
5051
framework="flask",
5152
recipe_list=[
5253
session.init(),
54+
dashboard.init(),
5355
emailverification.init("REQUIRED"),
5456
thirdpartyemailpassword.init(
5557
providers=[

0 commit comments

Comments
 (0)