Comments (7)
Hotfix:
type hotfixedAuthIdentity auth_identity.AuthIdentity
func(hotfixedAuthIdentity) TableName() string {return "basics"}
To use custom auth model without having to editing library files, name your user struct "Basics" or define a method TableName() string{return "basics"}, like above.
I dont tested #15 yet, but for me it seems like only works when you are using the default auth model: auth_identity.AuthIdentity()
The right fix would be "tx.Model(...).Where("provider = ? ", authInfo.Provider).Where("uid = ?", authInfo.UID)"
from auth.
I created a fork of qor where I committed several fixes/pull requests to make it work. Available at, https://github.com/qorpress/qorpress-auth-example
from auth.
there is a bug about table name which prevent login,register ...
I have a server which have old version of qor, there is no error like this. but I tried to install new qor version on other server, I faced up same issue. I fixed issue via editing library files.
from auth.
I have the same. Solved with #15
from auth.
from auth.
Please see #12 (comment)
We faced this issue when upgraded GORM from v1.9.1 to v1.9.10. Downgrading back fixed the issue.
p.s. This issue appears because GORM v1.9.2 changed behaviour and lack of dependency management in QOR.
p.s.s. It's up to you to don't use default
s (handlers, renderers, etc).
Also there is not sense to modify original QOR files, because there is opportunity to override behaviour via config.
from auth.
I encountered similar problems with g01.13.4 darwin/amd64 while experimenting with the QOR Example server. I was seeing pq: missing FROM-clause entry for table "basics" in server logs. The messages were coming from
-
qor/auth/user_store.go (45)
-
qor/auth/providers/password/handler.go (27)
-
qor/auth/providers/password/confirm.go (81)
I resolved the problem by modifying each of the files. I changed the where() calls similarly in each file to this example from handlers.go line 27
if tx.Model(context.Auth.AuthIdentityModel).Where(authInfo).First(authIdentity).RecordNotFound()
to
if tx.Model(context.Auth.AuthIdentityModel).tx.Where("UID = ?", authInfo.UID).First(authIdentity).RecordNotFound()
from auth.
Related Issues (20)
- Registration email not working HOT 2
- 'Unknow column...' error HOT 6
- Compilation errors while trying to run sample application in README.md HOT 7
- 授权这个模块,太难理解和使用 HOT 2
- 更新版本登录失败 HOT 1
- Client/Server auth
- Any two factor (2fa) feature on the horizon?
- views not working HOT 6
- any API documentation ? HOT 1
- google auth not working HOT 2
- Undefined config & models when Initializing Auth HOT 2
- How to use /login directly, set urlPrefix as "/" does not work
- Why no CORS implementation? Should we manually overwrite the Loginhandler and RegisterHandler?
- learning video
- Single sign on implementation in qor
- go-github implementation error
- Is this project alive? HOT 1
- jwt for api endpoints HOT 12
- Accidental sorry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth.