- ABP Framework version: v6.0.0
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
Hi. I used to get access_token and refresh_token during password flow of identityserver4. I migrated app to use openiddict and defined an openiddict application(client) with password and resresh_token flows enabled.
When I try the password flow using the related application(client) and admin user, I get only access_token. Refresh token is missing.
Can you help me for that?
Thanks.
6 Answer(s)
-
0
When I try the password flow using the related application(client) and admin user, I get only access_token. Refresh token is missing.
Please share your http request info.
-
0
var client = new RestClient("https://localhost:44322/connect/token"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddParameter("client_id", "DemoApplicationClient"); request.AddParameter("client_secret", "1q2w3e*"); request.AddParameter("grant_type", "password"); request.AddParameter("username", "admin"); request.AddParameter("password", "1q2w3E*"); request.AddParameter("scope", "ProductService"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);
-
0
DemoApplicationClient is created using blazor app UI and client_credentials,refresh_token,password flow options checked.
-
0
I tried to change the token expiry time span but still its 3598.
How change change so that client don't have to request every hour ? perhaps every 48 hours ?
PreConfigure<OpenIddictServerBuilder>(builder => { builder.SetAccessTokenLifetime(TimeSpan.FromMinutes(720)); builder.SetIdentityTokenLifetime(TimeSpan.FromMinutes(720)); });
-
0
hi @mgurer
request.AddParameter("scope", "ProductService offline_access");
-
0
Thanks, once more. You saved the day again.