Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Table storage DB adapter not working #11748

Open
ekalyvio opened this issue Sep 1, 2024 · 0 comments
Open

Azure Table storage DB adapter not working #11748

ekalyvio opened this issue Sep 1, 2024 · 0 comments
Labels
adapters Changes related to the core code concerning database adapters bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@ekalyvio
Copy link

ekalyvio commented Sep 1, 2024

Adapter type

@auth/azure-tables-adapter

Environment

  System:
    OS: Windows 11 10.0.22631
    CPU: (24) x64 AMD Ryzen 9 3900X 12-Core Processor
    Memory: 20.40 GB / 31.91 GB
  Binaries:
    Node: 20.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.9.0 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (127.0.2651.74)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @auth/azure-tables-adapter: ^1.4.2 => 1.4.2
    @auth/unstorage-adapter: ^2.0.0 => 2.0.0
    next: latest => 14.1.4
    next-auth: beta => 5.0.0-beta.17
    react: ^18.2.0 => 18.2.0

Reproduction URL

https://github.com/ekalyvio/next-auth-azure-adapter-issue

Describe the issue

Having issues like the following:
image

And error on the command line:
⨯ node_modules.pnpm@[email protected]\node_modules@azure\core-xml\dist\browser\xml.js (5:0) @
⨯ document is not defined

How to reproduce

Ensure to populate the .env.local file with the necessary values.

AUTH_SECRET="something" # Added by `npx auth`. Read more: https://cli.authjs.dev

AUTH_GITHUB_ID=something
AUTH_GITHUB_SECRET=something

AZURE_STORAGE_ACCOUNT_NAME=something
AZURE_STORAGE_ACCOUNT_KEY=something
AZURE_STORAGE_TABLES_ENDPOINT=something


# THIRD_PARTY_API_EXAMPLE_BACKEND= # Read more at https://authjs.dev/guides/integrating-third-party-backends

# AUTH_TRUST_HOST=1 # Read more at https://authjs.dev/getting-started/deployment#auth_trust_host

Then run pnpm dev.
Opening the page at: http://localhost:3000/ you will see the errors popping up.

Removing the section with the TableStorageAdapter (including the imports) from the auth.ts file, the error goes away but you don't have in that case access to Table storage.

Expected behavior

It shouldn't give these errors and it should continue running.

@ekalyvio ekalyvio added adapters Changes related to the core code concerning database adapters bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

1 participant