Plug-n-play single-file version.
-
Install npm package
@azure/data-tables -
Create a table for auth data,
authin my example. -
Plug the adapter function into the NextAuth:
Where env variable are as follows:
AZURE_ACCOUNT=storageaccountname
AZURE_ACCESS_KEY=longRandomKey
AZURE_TABLES_ENDPOINT=https://$AZURE_ACCOUNT.table.core.windows.net
- Can be used with a JWT session strategy to decrease reads and writes.
- Merged into the auth.js repo, use it directly from there https://authjs.dev/getting-started/adapters/azure-tables
