-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Environment information
- MWDB version (from
/about): - 2.16.0
- Installation method:
- mwdb.cert.pl service
- From PyPi (
pip install mwdb-core) - From docker-compose
- Other (please explain)
- Plugins installed:
Behaviour the bug (what happened?)
when I'm using OAuth login and uthe ser doesn't exist on MWDB, but exists on the OAuth provider, i'm getting pop-up - "We couldn't find an account associated with your OAuth identity. Do you want to register using [privde_name]?", and if you approve it new user created on MWDB without even move to "pending registration".
In the user-password login-based, every new user moves to "pending registration" first.
As the user-password login-based, every new user needs to move to "pending registration" first and not create the user automatically.
try to login with OAuth option with user which not exist on MWDB or didn't bind the provider yet.
here you can see the user-password based login with "pending" option
mwdb-core/mwdb/resources/auth.py
Line 180 in c778ccf
| user = User.create(login, obj["email"], obj["additional_info"], pending=True) |
and here the OAuth "create_user"
mwdb-core/mwdb/resources/oauth.py
Line 454 in c778ccf
| user = provider.create_user(id_token_claims["sub"], userinfo) |