from django.apps import AppConfig from django.conf import settings from supertokens_python import init, InputAppInfo, SupertokensConfig from supertokens_python.recipe import thirdpartyemailpassword, session from supertokens_python.recipe.thirdpartyemailpassword import Google, Github, Apple from supertokens_python.recipe import thirdpartyemailpassword from supertokens_python import get_all_cors_headers class ExpertsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'clients' def ready(self): init( app_info=InputAppInfo( app_name="patriot", api_domain="http://127.0.0.1:8000", website_domain="http://127.0.0.1:19000", api_base_path="/auth", website_base_path="/screens/signin" ), supertokens_config=SupertokensConfig( connection_uri="https://c75917c1a9f111ec8ccb73a204aeb225-eu-west-1.aws.supertokens.io:3568", api_key="4Pwu0ulPGO3LUjYvWvYH0Uxfr-tAmb" ), framework='django', recipe_list=[ session.init(), thirdpartyemailpassword.init( providers=[ # We have provided you with development keys which you can use for testsing. # IMPORTANT: Please replace them with your own OAuth keys for production use. Google( client_id='1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com', client_secret='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' ), Github( client_id='467101b197249757c71f', client_secret='e97051221f4b6426e8fe8d51486396703012f5bd' ), Apple( client_id="4398792-io.supertokens.example.service", client_key_id="7M48Y4RYDL", client_private_key="-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgu8gXs+XYkqXD6Ala9Sf/iJXzhbwcoG5dMh1OonpdJUmgCgYIKoZIzj0DAQehRANCAASfrvlFbFCYqn3I2zeknYXLwtH30JuOKestDbSfZYxZNMqhF/OzdZFTV0zc5u5s3eN+oCWbnvl0hM+9IW0UlkdA\n-----END PRIVATE KEY-----", client_team_id="YWQCXGJRJL" ) ] )] ) settings.CORS_ALLOW_HEADERS += get_all_cors_headers() mode='asgi' # use wsgi if you are running django server in sync mode