fayzul_
07/28/2023, 11:42 PM"""
ASGI config for studify project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
import Chat.routing
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.recipe import dashboard
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'studify.settings')
django_application = get_asgi_application()
init(
app_info=InputAppInfo(
app_name="studify",
api_domain="http://localhost:8000",
website_domain="http://localhost:53107",
api_base_path="/auth",
website_base_path="/"
),
supertokens_config=SupertokensConfig(
# https://try.supertokens.com is for demo purposes. Replace this with the address of your core instance (sign up on supertokens.com), or self host a core.
connection_uri="####",
api_key="####"
),
framework='django',
recipe_list=[
session.init(), # initializes session features
thirdpartyemailpassword.init(
providers=[
# We have provided you with development keys which you can use for testing.
# IMPORTANT: Please replace them with your own OAuth keys for production use.
Google(
client_id='####',
client_secret='####'
),