Open Closed

Login endpoint with access token #8694


User avatar
0
r.abouzid created
  • 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)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    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)

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00