qor / auth

Golang Authentication solution
MIT License
734 stars 98 forks source link

Fixed:Unknown column 'basics.provider' in 'where clause')? #20

Open supercaimin opened 6 years ago

supercaimin commented 6 years ago

When the provider is password,we will create the auth_identitys table using: gormDB.AutoMigrate(&auth_identity.AuthIdentity{}) If the variable authInfo declared as auth_identity.Basic,will cause if !tx.Model(context.Auth.AuthIdentityModel).Where(authInfo).Scan(&authInfo).RecordNotFound() { return nil, auth.ErrInvalidAccount } error. So,the variable authInfo must declare as auth_identity.AuthIdentity.

supercaimin commented 6 years ago

There are also the same problems when register.

swrdfish commented 5 years ago

save problem is in password reset: providers/password/reset_password.go

Please change all the occurrences inside password package.

sachinpuranik commented 4 years ago

This is quite valid fix and this is what i changed in my change set. My Changeset #39 can be discarded in case this is merged. This fixes the issue in other cases as well.