Skip to content

Recommended user registration/authorization flow #552

Open
@vancouverwill

Description

@vancouverwill

The documentation recommends using authorization grant type to register user. I tried this flow but in Authorization Handler it's default action is to authenticate client before authorizing which doesn't make sense see

However I found a workaround on line

if (options.authenticateHandler && !options.authenticateHandler.handle) {
there is the option to pass your own authenticateHandler which returns a user and they have recently added this to the docs see https://oauth2-server.readthedocs.io/en/latest/api/oauth2-server.html?highlight=authenticateHandler

However further down in the authorization workflow it blocks any grant type which is not of authorization_type see

if (!_.includes(client.grants, 'authorization_code')) {
,

We want to use password or client_credentials grant and authorize when the user registers, so not sure how authorize should be used (note there are quite a few questions about this open here about authorization such as #494).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions