Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refresh_session token is not yet valid #468

@Dhruv-Maradiya

Description

@Dhruv-Maradiya

I am using workos authkit and after refreshing the session result.authenticated is false and reason is The token is not yet valid (iat).

Issue only appears after refreshing the session.

Python Version: 3.12.11
Workos SDK: 5.26.1

Let me know if more context is needed.

refresh_result = await session.refresh(
    cookie_password=settings.WORKOS_COOKIE_PASSWORD
)

if not refresh_result.authenticated:
    # Authentication failed, even after refresh
    auth_logger.warning(
        f"Authentication failed even after refresh with reason: {refresh_result.reason}"  # type: ignore[reportOptionalMemberAccess]
    )
    return {}, None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions