cost 250 ms
在使用 fastapi 作為超級令牌的后端時,如何訪問 /docs 或自定義路由端點?

[英]How can I access the /docs or custom routes end point while using fastapi as backend for supertokens?

我正在使用 supertokens 構建身份驗證系統並使用 fastApi 作為后端,但是在使用他們的預構建 UI 並且已經在 python 中設置后端代碼時,我無法訪問 127.0.0.0:3000/docs 端點。 它只顯示一個空白頁。 此外,我在 API 中構建的自定義路由無法正常工作且無法 ...

Pydantic 在具有自定義模型的可選字段上返回“必填字段(type=value_error.missing)”

[英]Pydantic returns 'field required (type=value_error.missing)' on an Optional field with a custom model

我正在嘗試在 Fastapi-users pydantic 模式中構建一個自定義字段,如下所示: 在 UserRead 驗證 Pydantic 返回 在“TwitterAccount”架構中的每個字段上。 最后調用 update_forward_refs() 。 TwitterAccount 本 ...

在 FastAPI 中進行身份驗證后無法識別令牌

[英]Token is not recognized after authentication in FastAPI

我正在使用 FastAPI 創建一個基本的身份驗證注冊/登錄。 但是,在用戶成功注冊並登錄后,令牌不會被識別。 通過 Swagger UI 使用“/docs”可以正常工作,但不能從主應用程序使用。 這是我的代碼:main.py 這是我的代碼:auth.py 這是我的 forms.html: regi ...

如何僅在 FAST API 中為創建者設置編輯/刪除權限

[英]How To set edit / delete permissions for the creator only in FAST API

我只想為創建者設置編輯/刪除權限。 主要問題是在前端,任何用戶都可以在沒有創建者許可的情況下更新和刪除。 我嘗試 uuid 不猜測 id 值。 但問題仍然存在。 就像我想要那樣 僅有的 可以更新和刪除自己。 沒有別人了這是我的 model class: ...


排序:
質量:
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM