.netasp.net-identityidentityserver4abp-frameworkopeniddict

How to generate Access Token or Authorization Code without user password in ABP Framework?


I want to implement a passwordless authentication in ABP project. In my scenario, I want to authenticate mobile users with their phone number by sending a verification code via SMS, then give these mobile users an access token or authorization code to allow them to consume other endpoints.

I tried this article and it works well with MVC: https://community.abp.io/posts/implementing-passwordless-authentication-with-asp.net-core-identity-c25l8koj

However, how about using this with client-side users (in a mobile app or Blazor Web Assembly, etc.)?

How can I give access to mobile users to make consume the endpoints? I guess I have to generate an access token or an authorization code or something like that.

According to this answer, we can not create access tokens manually (https://support.abp.io/QA/Questions/2514/How-to-create-accesstoken-and-refresh-token-manually)

According to this answer, we can get the access token (I guess if the user signed it) https://support.abp.io/QA/Questions/1222/Call-Api-Without-Dynamic-Proxy-Client-From-Blazor-Wasm--Http-Dynamic-Proxy-Error

So, what do you think, is there any workaround for creating access token for mobile users? Any response would be highly appreciated.


Solution

  • Finally found a solution. Thanks to EasyAbp team: https://github.com/EasyAbp/Abp.PhoneNumberLogin

    Result: enter image description here