如何在ABP框架中生成无用户密码的Access Token或Authorization Code?

问题描述 投票:0回答:1

我想在ABP项目中实现无密码认证。在我的场景中,我想通过短信发送验证码来使用手机号码对移动用户进行身份验证,然后为这些移动用户提供访问令牌或授权码以允许他们使用其他端点。

我尝试了这篇文章,它与 MVC 配合得很好:https://community.abp.io/posts/implementing-passwordless-authentication-with-asp.net-core-identity-c25l8koj

但是,与客户端用户(在移动应用程序或 Blazor Web Assembly 等中)一起使用它怎么样?

如何授予移动用户访问权限以使用端点?我想我必须生成访问令牌或授权代码或类似的东西。

根据这个答案,我们无法手动创建访问令牌(https://support.abp.io/QA/Questions/2514/How-to-create-accesstoken-and-refresh-token-manually

根据这个答案,我们可以获得访问令牌(我猜如果用户签名了)https://support.abp.io/QA/Questions/1222/Call-Api-Without-Dynamic-Proxy-Client-来自 Blazor-Wasm--Http-Dynamic-Proxy-Error

那么,您认为有什么解决方法可以为移动用户创建访问令牌吗?任何回复将不胜感激。

.net asp.net-identity identityserver4 abp openiddict
1个回答
0
投票

终于找到解决办法了。感谢 EasyAbp 团队: https://github.com/EasyAbp/Abp.PhoneNumberLogin

结果: enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.