Skip to content

useAuth with CwmsLoginAuthMethod does not update state on logout #180

@krowvin

Description

@krowvin

the useAuth check for if a user is logged in does not seem to poll or update often enough.

I have to refresh the page after a while if my session has expired.

If I login it does not immediately recognize that I am logged in despite having the cookie set and otherwise being logged in (possibly due to internal state)

I am using this for the checkUrl/etc

const authMethod = createCwmsLoginAuthMethod({
  authUrl: `${AUTH_HOST}/CWMSLogin`,
  authCheckUrl: `${CDA_URL}/auth/keys`,
})

Wonder if we can add a setInterval or similar to help enforce login state. I thought the checkUrl already did this but I could not find it in the source.

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