- Template: microservice
- Created ABP Studio Version: 0.9.5
- Current ABP Studio Version: 0.9.21
- UI Framework: angular
- Theme: leptonx
- Theme Style: system
- Database Provider: ef
- Database Management System: sqlserver
- Public Website: Yes
Hello, I'm looking for an endpoint or a method that , given the username and password, returns the access_token,token_type, expires_in to use with a mobile app. The login endpoint, in the AuthServer, returns only result and description.
I created a new microservice , Auth Service, that uses Identity Service's and AuthServer's endpoints .
1 Answer(s)
-
0
Hi,
There is no such endpoint like that for security reasons and ABP uses OpenId Connect standards by default. But the closest option for your case might be Resource Owner Password Flow. Here is the documentation in OpenIdDict: https://documentation.openiddict.com/guides/choosing-the-right-flow.html#resource-owner-password-credentials-flow-not-recommended-for-new-applications
If you create your client by using OpenIdDict Module UI, make sure you checked
Allow password flow
option:-- OR -- If you seed your client data in the OpenIdDictDataSeedContributor.cs make sure your application has
Password
GrantType while creating it:Then you can follow steps from OpenIdDict documentation that I mentioned above. I highly suggest using one of the OpenId Client library to connect your custom clients properly on the mobile platform. (In example for android: https://github.com/openid/AppAuth-Android)