oauth-2.0 – 通过openid connect规范注册最终用户

我找不到在openid connect中注册最终用户的规范.

也许,你知道怎么做?

我有一些想法,但我正在寻找官方答案.

最佳答案 当他们谈论
Authentication of the End-User时,隐含地包含了这一部分.

当您的提供商尝试对最终用户进行身份验证时(通过显示登录表单),如果用户没有帐户,您可以:

>在与登录相同的视图中显示注册表单.
>在视图中的某处放置一个链接(例如“创建帐户”).

在这两种情况下,您将拥有一个“下一个”或“redirect_to”(无论您喜欢什么称呼它),它将具有OpenID身份验证请求URL安全编码(或OAuth2授权请求).

看一个例子:

# Auth Request from some client.
/openid/authorize?client_id=123&redirect_uri=http%3A%2F%2Fexample.com%2F&response_type=code&scope=openid%20profile%20email&state=abcdefgh

# Because user is not logged, you attempts to Authenticate it.
/login?next=%2Fopenid%2Fauthorize%3Fclient_id%3D123%26redirect_uri%3Dhttp%253A%252F%252Fexample.com%252F%26response_type%3Dcode%26scope%3Dopenid%2520profile%2520email%26state%3Dabcdefgh

# Because user is not registered. You provide a link like this.
/register?next=%2Fopenid%2Fauthorize%3Fclient_id%3D123%26redirect_uri%3Dhttp%253A%252F%252Fexample.com%252F%26response_type%3Dcode%26scope%3Dopenid%2520profile%2520email%26state%3Dabcdefgh

# After registration. The flow will continue.

希望你理解它.问候.

点赞