porcellus
03/22/2022, 11:57 AMforRoot
is made up of two parts:
- We want you to add everything necessary for a FactoryProvider
that will provide an AuthModuleConfig
, but we are overriding the provide option and scope could mess with some things so we don't want to allow those (hence the Omit
)
- You may need to import something in the factory you added so we want to allow an imports prop just like you would configure for a normal modules (so Pick
the imports prop from the ModuleMetadata
)-|Maix|
03/22/2022, 4:11 PM-|Maix|
03/22/2022, 4:13 PMrp
03/22/2022, 5:02 PMrp
03/22/2022, 5:10 PMrp
03/22/2022, 5:11 PM-|Maix|
03/22/2022, 5:12 PMrp
03/22/2022, 5:13 PMLucas | BaragZ
03/23/2022, 9:42 AMFrAgOrDiE
03/23/2022, 11:44 AMPasswordless.init.createAndSendCustomEmail
parameter. I suppose I'm going to specify my email sending logic inside here, but how do I call it? Or when does it get called?rp
03/23/2022, 11:54 AMWilliam Pedersen
03/23/2022, 6:47 PMkelbs
03/24/2022, 4:26 AMkelbs
03/24/2022, 4:27 AM{
"user": {
"id": "1cd85953-...ad861c",
"email": "redacted@gmail.com",
"timeJoined": 1648091796965
},
"status": "OK"
}
kelbs
03/24/2022, 4:30 AMDlyaSeba365
03/24/2022, 8:46 AMkfahad5607
03/24/2022, 10:42 AMDlyaSeba365
03/24/2022, 2:40 PMDlyaSeba365
03/24/2022, 2:42 PMrp
03/24/2022, 3:50 PMDlyaSeba365
03/24/2022, 4:27 PMnadilas
03/24/2022, 5:00 PManubhav
03/25/2022, 4:46 AMrp
03/25/2022, 5:58 AMAdiboi
03/25/2022, 5:59 AMuser
03/25/2022, 9:27 AMjson
{
"detail": "Not Found"
}
This is my python code base
python
from supertokens_python import init, InputAppInfo, SupertokensConfig
from supertokens_python.recipe import emailpassword, session
from supertokens_python import get_all_cors_headers
from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from supertokens_python.framework.fastapi import Middleware
init(
app_info=InputAppInfo(
app_name="test",
api_domain="http://localhost:8000",
website_domain="http://localhost:3000",
api_base_path="/api",
website_base_path="/auth"
),
supertokens_config=SupertokensConfig(
connection_uri="https://try.supertokens.com",
# api_key=""
),
framework='fastapi',
recipe_list=[
session.init(), # initializes session features
emailpassword.init()
],
mode='asgi' # use wsgi if you are running using gunicorn
)
app = FastAPI()
app.add_middleware(Middleware)
# TODO: Add APIs
app = CORSMiddleware(
app=app,
allow_origins=[
"http://localhost:3000"
],
allow_credentials=True,
allow_methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
allow_headers=["Content-Type"] + get_all_cors_headers(),
)
running via: uvicorn main:app --reload --host=0.0.0.0 --port=3001rp
03/25/2022, 9:30 AMrp
03/25/2022, 9:31 AMuser
03/25/2022, 9:33 AM