Open Closed

How to get refresh token in postman #3955


0
guven.uysall created
  • ABP Framework version: v5.3.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no

When I try to login with angular application, it gives me information such as access_token, id token, refresh token. When I do the token import with postman or in my flutter application, I can't get refresh_token information, id_token information. Only acces token information comes.


8 Answer(s)
  • 0
    berkansasmaz created
    Support Team

    Hi, I see your question is the same as the question here. If not, please let me know.

    Since Maliming explained the situation quite clearly, I believe you will solve the problem if we are talking about the same question.

    Duplicate of https://support.abp.io/QA/Questions/1088/How-to-get-Api-token-using-client-secret-key

  • 0
    guven.uysall created

    Hi berkan,

    @Maliming number one in the world

  • 0
    berkansasmaz created
    Support Team

    Definitely! 🥳🥳

  • 0
    guven.uysall created

    Hi @berkan, In the client we created, we can only receive tokens with admin via postman. When we create a new user from the user screen in angular and try to login with this user in postman

    { "error": "invalid_grant", "error_description": "Invalid username or password!" } 2022-10-28 12:12:31.703 +03:00 [INF] User authentication failed: Invalid username or password!, details: {"ClientId":"HitFrame_HitMobile_Flutter","ClientName":"HitFrame_HitMobile_Flutter","GrantType":"password","Scopes":"AccountService address AdministrationService email HitMobileService IdentityService offline_access openid phone profile role SaasService","AuthorizationCode":"********","RefreshToken":"********","UserName":"hitmobile","AuthenticationContextReferenceClasses":null,"Tenant":null,"IdP":null,"Raw":{"client_id":"HitFrame_HitMobile_Flutter","client_secret":"***REDACTED***","username":"hitmobile","password":"***REDACTED***","grant_type":"password"},"$type":"TokenRequestValidationLog"} 2022-10-28 12:12:31.703 +03:00 [INF] {"Username":"hitmobile","Endpoint":"Token","ClientId":"HitFrame_HitMobile_Flutter","Category":"Authentication","Name":"User Login Failure","EventType":"Failure","Id":1001,"Message":"Invalid username or password!","ActivityId":"8000002f-0000-ef00-b63f-84710c7967bb","TimeStamp":"2022-10-28T09:12:31.0000000Z","ProcessId":17324,,,"$type":"UserLoginFailureEvent"} 2022-10-28 12:12:31.704 +03:00 [INF] {"ClientId":"HitFrame_HitMobile_Flutter","ClientName":"HitFrame_HitMobile_Flutter","RedirectUri":null,"Endpoint":"Token","SubjectId":null,"Scopes":"AccountService address AdministrationService email HitMobileService IdentityService offline_access openid phone profile role SaasService","GrantType":"password","Error":"invalid_grant","ErrorDescription":"Invalid username or password!","Category":"Token","Name":"Token Issued Failure","EventType":"Failure","Id":2001,"Message":null,"ActivityId":"8000002f-0000-ef00-b63f-84710c7967bb","TimeStamp":"2022-10-28T09:12:31.0000000Z","ProcessId":17324,}

  • 0
    maliming created
    Support Team

    hi

    Invalid username or password!

    Can you try with another password?

  • 0
    guven.uysall created

    Hi @maliming,

    So you say everything is simple. Problem solved. Thanks.

  • 0
    guven.uysall created

    Hi @maliming, How do I test if the access_token has expired. Which endpoints should I request?

  • 0
    maliming created
    Support Team

    hi

    https://identitymodel.readthedocs.io/en/latest/client/introspection.html https://www.oauth.com/oauth2-servers/token-introspection-endpoint/