No module error named 'makefun' on starting server #101
-
I got the following error when running a fastapi server
main.py from fastapi import Depends, FastAPI
from fastapi.security import OAuth2AuthorizationCodeBearer
from fief_client import FiefAccessTokenInfo, FiefAsync
from fief_client.integrations.fastapi import FiefAuth
fief = FiefAsync(
"https://example.fief.dev", #replaced with Base URL of Fief tenant
"YOUR_CLIENT_ID", #replaced with client id
"YOUR_CLIENT_SECRET", #replaced with client secret provided by fief client
)
scheme = OAuth2AuthorizationCodeBearer(
"https://example.fief.dev/authorize", #replaced with Base URL of Fief tenant/authorize
"https://example.fief.dev/api/token", #replaced with Base URL of Fief tenant/api/token
scopes={"openid": "openid", "offline_access": "offline_access"},
)
auth = FiefAuth(fief, scheme)
app = FastAPI()
@app.get("/user")
async def get_user(
access_token_info: FiefAccessTokenInfo = Depends(auth.authenticated()),
):
return access_token_info requirements.txt
Command :
OS:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Hail, @su-shubham 👋 Welcome to Fief's kingdom! Our team will get back to you very soon to help. In the meantime, take a minute to star our repository ⭐️ Farewell! |
Beta Was this translation helpful? Give feedback.
-
Hello @su-shubham 👋 Are you sure you're running your app from an isolated Python environment? It ensures all your dependencies are correctly installed an in line: python -m venv venv
source venv/bin/activate
pip install -r requirements.txt |
Beta Was this translation helpful? Give feedback.
-
@frankie567 How can I extend User Model.Actually I want to use some more fields at database level.For example if I have post and user model so I want to create some relationship between them. Is it possible by using Fief or need to use fastapi-user |
Beta Was this translation helpful? Give feedback.
-
@frankie567 Can you please make a documentation of Fief - React (Javascript). Actually, I am stuck on implementing with React typescript. Typescript is whole new for me so that's why i think it can also helps for others while in react javascript. |
Beta Was this translation helpful? Give feedback.
-
@frankie567 there should be visible and invisible option like an eye at the end of password row. |
Beta Was this translation helpful? Give feedback.
Hello @su-shubham 👋
Are you sure you're running your app from an isolated Python environment? It ensures all your dependencies are correctly installed an in line:
python -m venv venv source venv/bin/activate pip install -r requirements.txt