We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我使用的是create_async_engine 创建的异步数据库引擎 ` engine = create_async_engine(url='mysql+aiomysql://root:123456@localhost:3306/fastapi')
JwtTokenStore
auth = Auth( db=AsyncDatabase(engine), token_store=JwtTokenStore(secret_key='1558858285966') )
site = AuthAdminSite( settings=Settings(database_url_async='mysql+aiomysql://root:123456@localhost:3306/fastapi'), auth=auth )`
The text was updated successfully, but these errors were encountered:
将auth的db对象和site的db对象使用同一个, 你这样虽然是相同的数据库连接,但是他会创建两个db对象
Sorry, something went wrong.
No branches or pull requests
我使用的是create_async_engine 创建的异步数据库引擎
`
engine = create_async_engine(url='mysql+aiomysql://root:123456@localhost:3306/fastapi')
使用
JwtTokenStore
创建auth对象auth = Auth(
db=AsyncDatabase(engine),
token_store=JwtTokenStore(secret_key='1558858285966')
)
将auth对象传入AdminSite
site = AuthAdminSite(
settings=Settings(database_url_async='mysql+aiomysql://root:123456@localhost:3306/fastapi'),
auth=auth
)`
The text was updated successfully, but these errors were encountered: