Skip to content

Commit

Permalink
configure android app to allow refresh tokens indefinitely as long as…
Browse files Browse the repository at this point in the history
… the client checks in once every 10d
  • Loading branch information
AerisG222 committed Aug 30, 2024
1 parent f672961 commit 5b5f68f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/auth/Models/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ public IEnumerable<Client> GetClients()
RequireClientSecret = false,
AllowOfflineAccess = true,
RedirectUris = { "us.mikeandwan.photos:/signin-oidc" },
RefreshTokenUsage = TokenUsage.ReUse,
AbsoluteRefreshTokenLifetime = 0,
RefreshTokenUsage = TokenUsage.OneTimeOnly,
RefreshTokenExpiration = TokenExpiration.Sliding,
SlidingRefreshTokenLifetime = (int) TimeSpan.FromDays(10).TotalSeconds,
AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.Email,
Expand All @@ -116,10 +119,9 @@ public IEnumerable<Client> GetClients()

// identity resources
JwtClaimTypes.Role
}
// IdentityTokenLifetime = 5,
// AccessTokenLifetime = 5,
// AbsoluteRefreshTokenLifetime = 20
},
//,IdentityTokenLifetime = 10,
//AccessTokenLifetime = 10,
},
new Client
{
Expand Down

0 comments on commit 5b5f68f

Please sign in to comment.