Skip to content

Logout happening periodically despite passing disableIdle: true in idleOptions #576

@paulyoung

Description

@paulyoung

Describe the bug

During local development I noticed that I was getting logged out after iterating on something for a while that requires being logged in.

I started doing AuthClient.create({ idleOptions: { disableIdle: true }) to try and prevent this but it's still happening. I stepped through the code and I can confirm that an idleManager isn't being created.

Is this expected behavior, or a known issue?

To Reproduce
Steps to reproduce the behavior:

  1. Create an auth client as described above
  2. Authenticate using local internet identity
  3. Leave a browser window open for a while
  4. Refresh the page after a while
  5. Confirm that you are logged out

Expected behavior
You remain logged in until you explicitly log out

Desktop (please complete the following information):

  • macOS Monterey Version 12.2.1 (21D62)
  • Brave Version 1.36.119 Chromium: 99.0.4844.83 (Official Build) (arm64)

Additional context

$ cat package-lock.json | grep dfinity
    "@dfinity/agent": {
      "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-0.11.1.tgz",
    "@dfinity/auth-client": {
      "resolved": "https://registry.npmjs.org/@dfinity/auth-client/-/auth-client-0.11.1.tgz",
    "@dfinity/authentication": {
      "resolved": "https://registry.npmjs.org/@dfinity/authentication/-/authentication-0.11.1.tgz",
    "@dfinity/candid": {
      "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-0.11.1.tgz",
    "@dfinity/identity": {
      "resolved": "https://registry.npmjs.org/@dfinity/identity/-/identity-0.11.1.tgz",
    "@dfinity/principal": {
      "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-0.11.1.tgz",

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions