Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Exception thrown when the machine uses local time zone #41

@csmucsi

Description

@csmucsi

The following error is returned when the machine uses local time zone:

Server Error in '/' Application.

Both the access token and the refresh token have expired
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Both the access token and the refresh token have expired

Source Error:

Line 441: // Validate refresh token expiration
Line 442: if (_refreshToken.ValidTo <= DateTime.Now)
Line 443: throw new Exception("Both the access token and the refresh token have expired");
Line 444:
Line 445: // Load new identity from token endpoint via refresh token

Source File: C:\Users\mcs\Documents\Visual Studio 2015\Projects\keycloak\KeycloakOwinAuthentication\src\KeycloakIdentityModel\KeycloakIdentity.cs Line: 443

Hint: DateTime.Now returns local time. Please consider using DateTime.UtcNow where needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions