You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are starting by simply using the on_after_register hook, but this requires that first we create a valid user and then we associate it to a settings entry -> therefore we cannot make the FK required.
If we customize SQLModelUserDatabaseAsync.create, we could create the two DB objects at the same time.
Add attribute SQLModelUserDatabaseAsync.user_settings_model, and customize SQLModelUserDatabaseAsync.create so that it creates both the user and their settings.
Rewrite the POST /auth/register/ endpoint without using fastapi-users or SQLModelUserDatabaseAsync logics - or maybe by only using some of them.
The text was updated successfully, but these errors were encountered:
For the moment, we will keep the UserOAuth.user_settings_id foreign key optional, even though it will always be present in practice. In a later update, we'll try to fully integrate the user-register and oauth-related endpoints from fastapi-users into fractal-server.
We decided to postpone this task mostly due to several other ongoing updates - but this is ready for further work.
We are starting by simply using the
on_after_register
hook, but this requires that first we create a valid user and then we associate it to a settings entry -> therefore we cannot make the FK required.If we customize
SQLModelUserDatabaseAsync.create
, we could create the two DB objects at the same time.Ref:
We have at least two options:
SQLModelUserDatabaseAsync.user_settings_model
, and customizeSQLModelUserDatabaseAsync.create
so that it creates both the user and their settings.POST /auth/register/
endpoint without using fastapi-users orSQLModelUserDatabaseAsync
logics - or maybe by only using some of them.The text was updated successfully, but these errors were encountered: