Skip to content

OAuth new user register in MWDB (approval requirement for new accounts) #1101

@dor15

Description

@dor15

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

user = User.create(login, obj["email"], obj["additional_info"], pending=True)

and here the OAuth "create_user"

user = provider.create_user(id_token_claims["sub"], userinfo)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature description e.g. which involves implementation of new components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions