Problems Upgrading: AuthProviders do not exist and can't be configured #6

Open
opened 1 year ago by snaums · 0 comments
snaums commented 1 year ago
Owner

A problem stemming from upgrading mvoCI and leaving the database intact. When the database and a user was created before the introduction of AuthProviders, the native-Provider does not exist in the database. However, a call to the Configure-method of an AuthProvider needs a reference to the authProvider object from the database for potentially changing settings in the extra-fields.

Possible solutions are:

  • on every start try and create AuthProviders for all user, for which they don't exist
  • create the authProvider when none is found in the database when needed (leaves loads of user potentially without AuthProvider and has consequences for the login-code)
  • think again about which users and which AuthProviders really need a database object per user, and which don't. Especially native stores its secret in User.Passhash and cannot be used anywhere down the chain.
A problem stemming from upgrading mvoCI and leaving the database intact. When the database and a user was created before the introduction of AuthProviders, the *native*-Provider does not exist in the database. However, a call to the Configure-method of an AuthProvider needs a reference to the authProvider object from the database for potentially changing settings in the extra-fields. Possible solutions are: * on every start try and create AuthProviders for all user, for which they don't exist * create the authProvider when none is found in the database when needed (leaves loads of user potentially without AuthProvider and has consequences for the login-code) * think again about which users and which AuthProviders really need a database object per user, and which don't. Especially *native* stores its secret in User.Passhash and cannot be used anywhere down the chain.
snaums added the
bug
label 7 months ago
Sign in to join this conversation.
Loading…
There is no content yet.