Commit Graph

836 Commits

Author SHA1 Message Date
Anthony DePasquale
0e12a5cb7a SvelteKit, Next.js, SolidStart 2025-04-13 14:11:08 +02:00
Anthony DePasquale
c8e078a714 SimpleWebAuthn 2025-04-13 14:11:08 +02:00
Anthony DePasquale
1b092e42be "sign in" and "sign up" as verbs 2025-04-13 14:11:08 +02:00
Anthony DePasquale
9f78ee8d4c Code 2025-04-13 14:11:08 +02:00
Anthony DePasquale
2baaa085a7 "set up" as verb 2025-04-13 14:11:08 +02:00
Anthony DePasquale
25d517e99e TypeScript 2025-04-13 14:11:08 +02:00
gandan
e077be39a2 docs: correct Svelte Kit to SvelteKit (#2246) 2025-04-13 14:59:47 +03:00
Bereket Engida
8c2c2702ef docs(database): update ID generation configuration details 2025-04-13 03:38:41 +03:00
Bereket Engida
c9fa76f9d1 docs(expo): remove $fetch api usage 2025-04-13 00:30:11 +03:00
Bereket Engida
2bbe85ae6f docs(next-auth-migration): add reminders for 'createdAt' and 'updatedAt' fields in session and account schemas 2025-04-13 00:16:56 +03:00
Bereket Engida
ee9e969712 docs(next-auth-migration): fix 'accounts' typo 2025-04-13 00:13:59 +03:00
Bereket Engida
ac084b1b73 docs: update next cookies example 2025-04-12 23:21:09 +03:00
ririxi
cb900f9594 feat(organization): support multiple permissions check (#2227)
* feat: remove the artificial resource limit so that code can check

Also change `permission` to `permissions` (clearer for end user). `permission` is left for backwards compatibility.

* docs: add examples for multiple perms checking

* refactor: check `permissions` first, then legacy one

* feat: use union types for `permission` & `permissions`

* fix: properly use union types

* fix: remove accidental `@deprecated` comment

* chore: lint

* fix test

* chore: add oneTimeToken plugin to client barrel exports (#2224)

* docs(expo): add id token usage

* feat(oauth2): override user info on provider sign-in (#2148)

* feat(oauth2): override user info on provider sign-in

* improve email verification handling

* resolve mrge

* fix(sso): update overrideUserInfo handling to use provider configuration

* fix param

* chore: change plugin interface middleware type (#2195)

* fix: delete from session table when stopImpersonate called (#2230)

* chore: fix active organization inferred type

* chore: fix admin test

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
Co-authored-by: Wade Fletcher <3798059+wadefletch@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
2025-04-12 22:00:58 +03:00
Bereket Engida
de0aadb37f docs(security): add IP address header configuration for Better Auth 2025-04-12 21:27:02 +03:00
Bereket Engida
1c098200c9 docs(expo): add id token usage 2025-04-12 07:54:28 +03:00
Bereket Engida
9e951aa0b3 feat: add option to disable session refresh on use (#2126)
* feat: add option to disbale session refresh on use

* docs(session-management): add documentation for disabling session refresh option
2025-04-11 17:12:35 +03:00
Bereket Engida
0493746a4b feat(jwt): add sub claim and getSubject (#2194) 2025-04-11 14:06:20 +03:00
Léo LEDUCQ
c14f127fd3 feat(socialLink): add support for custom scopes in social account linking (#2074)
* feat(socialLink): add support for custom scopes in social account linking

- Updated documentation to include information on requesting specific scopes when linking social accounts.
- Added a test case to verify that custom scopes are correctly passed to the authorization URL.
- Modified the account linking endpoint to accept additional scopes as an optional parameter.

* chore: lint

* fix(account): update account linking logic and tests

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 13:54:30 +03:00
Mauricio Siu
b266048941 feat: support custom issuer totp (#2113)
* feat(two-factor): add optional issuer parameter for TOTP URI generation

* feat(two-factor): enhance issuer parameter handling for TOTP URI generation

* feat(two-factor): add tests for custom issuer handling and fallback to appName in TOTP URI generation

* docs(two-factor): improve formatting and spacing in 2FA documentation for better readability

* docs(two-factor): refine code formatting and spacing in 2FA documentation for improved clarity
2025-04-11 13:13:04 +03:00
Bereket Engida
81e45012ef feat(organization): add invitation limit (#2014)
* feat: add invitation limit

* feat: add list invitations functionality and cancel pending invitations on re-invite

* update docs

* update docs
2025-04-11 12:44:49 +03:00
Alexander Lyon
6b22e08c2b feat(facebook): add support for business login using config ids (#1990) 2025-04-11 12:42:07 +03:00
Bereket Engida
e24a60d717 feat(phone-number): add phone number verification requirement before sign-in (#1984)
* feat(phone-number): add phone number verification requirement before sign in

* docs: add doc
2025-04-11 12:41:00 +03:00
John Tanzer
99ffacc251 feat: have-i-been-pwned plugin (#1978)
* feat: add have i been pwned first draft plugin

* fix: remove error being thrown when no password or body

* fix: return the ctx and ctx body check

* feat: add custom message option

* feat: add first draft docs for plugin

* fix: import in docs

* fix: big typo

* fix: typo

* fix: typo and correct error message

* fix: typo and options optional

* fix: small fixes import and safe options

* feat: add tests - not sure i totaly understand getTestInstance :(

* fix: lint

* simplify checks and fix tests

* feat: add "Have I Been Pwned" plugin to sidebar and update documentation

* build

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 12:39:41 +03:00
Đorđe Zeljić
155036001e docs: update parameter destructuring in JWT payload example (#1890) 2025-04-11 11:31:17 +03:00
Joshua Ji
ef87d8c4ee docs(next-auth-migration-guide): update db mapping (#1872) 2025-04-11 10:57:18 +03:00
Oscar
bf28165e90 feat: (captcha plugin) adding support for Google ReCAPTCHA v3 and hCaptcha (#1836)
* feat: Adding support for HCaptcha and Google ReCAPTCHA v3

* docs: Update captcha plugin documentation with reCAPTCHA v3 and hCaptcha

* fix: Restrict captcha verification to email sign-in and sign-up + updated documentation
2025-04-11 10:55:16 +03:00
Khiet Tam Nguyen
4590b5b456 feat: zoom social provider (#1671)
* feat: zoom oauth

* docs: zoom oauth instructions

* docs: notes on adding more zoom scopes depending on use case

* chore: remove console.log

* update zoom icon

* update zoom icon

* fix: zoom export

* chore: lint

---------

Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 10:40:54 +03:00
Igor Pawelec
0214251e3b docs: updated teams schema (#1640)
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2025-04-11 10:19:30 +03:00
Elliot Sharpe
bb1d2f3d0a docs: add instructions to install required expo packages for login with social to docs (#1636) 2025-04-11 10:13:10 +03:00
Bereket Engida
5ae40dc721 docs(phone-number): remove unused api 2025-04-11 10:10:41 +03:00
Bereket Engida
880a559546 feat(email-otp): support attempt numbers for email-otp (#2146) 2025-04-11 09:59:13 +03:00
Bereket Engida
5591e78bcb feat(phone-number): add number of attempts configuration (#2046) 2025-04-11 09:22:09 +03:00
Maxwell
986614b241 feat: createAdapter and useNumberId (#1926)
* refactor(adapter): `createAdapter` helper

* update: Kysely adapter support

* update: memory adapter

* chore: cleanup

* update: MongoDB adapter supported

* update: mongodb adapter file names

* update: support for prisma adapter

- also fixed memory adapter with `getField`
- disabled all debug logs by default

* chore: lint

* fix: generate an `id` if it isn't already provided

* update(test): init config snapshot

* update: existing adapters tests to include an `id` existence check

* fix: renamed prisma adapter file names

* ^

* update(mongo): Removed `disableIdGeneration` for mongo adapter

* fix: dont add `id` from fields if `disableIdGeneration` is false

* fix: adapter converting dates to string using the wrong value data

* add: create-adapter tests

* update: moved `adapter` to `create-adapter` under the existing `adapters` folder

* WIP: docs

* fix: create-adapter test importing from wrong path

* WIP: docs

* update: key transformation map options are now objs not fns

* chore: lint

* update: cleanup & added debugLogs/usePlural option to some adapters

* update: tests

* chore: cleanup

* update: fields name & made customTransforminput/output to run after supportsDates/supportsBoolean/SupportsJSON to run

* chore: lint

* Update: docs

* update: update-many to not use transformOutput

* chore: lint

* fix: adapter options breaking

* update: set the default limit on findMany

* update: docs

* update: docs & cleaned up code

* update: create schema comes with `tables` now

* This is useless

* fix: api-key shouldn't handle id gen in row creation

* chore: lint

* WIP: useNumberId

* chore: cleanup

* removed all cases of `id` during adapter.create call

* update: useNumberId

* update: drizzle adapter schema generation

- update: pg now sets `id` field to use `uuid`.
- fix: sets the correct reference `onDelete` action.
- refactor: cleaned up the code a lot more

* update: added `supportNumericIds` in create adapter options

* chore: cleanup

* update(tests): added option to disable any adapter tests & created a `useNumberId` test

* fix: skip tests options were using old method

* chore: lint

* WIP: Drizzle tests with number id

* chore: lint

* fix: memory adapter failing on number id adapter tests

* chore: cleanup

* fix: adapter tests fail due to emails needing to be unique

* update: support drizzle adapter use-number-id

* fix: cleanup Drizzle Adapter tests

* fix: drizzle schema generation for reference id fields

* fix: type errs in memory adapter tests

* fix: memory adapter tests

* Update init.test.ts.snap

* fix: prisma tests correctly uses the right primsa client per schema

* Delete run-vitest.ts

* update: create-adapter to support `getDefaultFieldName`

* update: create-adapter adapter options updated

* fix: adapters using older function names

* fix: create-adapter now converts where clauses & added tests

* update: new `getFieldAttributes` option in create-adapter, and fixed convert where clause fn

* chore: cleanup

* update: convertWhereClause in create-adapter improved

* update: BAOptions to start using `database` & updated adapter tests

* fix: type errors

* chore: lint

* update: default config values for the create-adapter config

* fix: getModelName doesnt take into account of plural

* chore: cleanup

* update: improved getDefaultModelname

* fix: create-adapter transform input doesn't take into account reference IDs

* fix: transformInput on reference IDs doesn't take into account of array IDs

* chore: lint

* fix: prisma tests

* fix: Prisma adapter tests running one after another

* fix: init snapshot should state supportJSON as `false`

* fix: drizzle adapter tests

* update: adapter test options to allow passing a test prefix

* chore: add state.txt to gitignore

* remove: state.txt from gitignore, it's useless

* chore: lint

* Update adapter.prisma.numberid.test.ts

* fix: get-migration for mysql & mssql `id` fields to use varchar

* chore: cleanup

* update: adapter comes with adapter-test-debug-log functions

* update: made adapterTestDebugLog functions only be in adapter if config enabled it

* fix: transactionId for debug logs not working correctly

This was due to the adapter being reinitialized each test case

* update: Added colors to debug logs

* update: adapter tests a little more refined

* add: deepmerge dev deps to deep merge better auth options config for adapters

* fix: create-adapter types

* update: revert back to old types

* fix: prisma adapter tests now run one after another

* fix: kysely adapter to work when no `id` is provided

* update: mongoDB to set `supportNumericids` to false

* update(docs): discuss new `database` object in BetterAuthOptions

* add: support for custom ID generation

* fix: docs had incorrect default value for `supportsJSON`

* update(docs): added number id adapter test documentation

* fix: drizzle-adapter mysql tests

* update: drizzle-adapter tests to use deepmerge

* add: drizzle-adapter mysql tests to test useNumberId

* add: Prisma generate to support number id

* update: support the old `generateId` option, but warn the user for deprecation

* update: init test snapshot

* update: adapter tests not included in normal tests

* Update pnpm-lock.yaml

* fix: typo in file names for kysley test files

* update: separated adapter tests

* Update pnpm-lock.yaml

* fix: please tell me I actually fixed this

* fix: pnpm-lock merge conflict

* chore: lint

* fix: sveltekit pkg.json merge conflicts (hopefully)

* Delete pnpm-lock.yaml

* update: createSchema takes into account of rate-limit and secondaryStorage

* improve docs

* add drizzle returning id retriver

* chore: fix test script

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 09:04:49 +03:00
Braden Wong
2399c732d0 docs(hono): add client-side auth configuration guide (#2209) 2025-04-11 07:10:27 +03:00
Daniel Zaremba
84194242ae docs: fix syntax for account linking (#2216) 2025-04-11 00:03:23 +03:00
Geoff
6244fee5b1 docs: typo fix in example syntax fix (#2214) 2025-04-10 21:08:23 +03:00
KinfeMichael Tariku
9d55587183 docs: correct prisma client for custom path
docs: correct prisma client for custom path
2025-04-10 14:39:56 +03:00
Kinfe123
f4a3812dae fix: prisma client docs 2025-04-10 14:37:00 +03:00
Bereket Engida
06ddd9121e feat(react-start): add react-start integration for cookie handling (#2119) 2025-04-10 07:45:55 +03:00
Ben
a9440314cf docs: add RONIN database adapter to community adapters (#2200) 2025-04-10 05:24:40 +03:00
Bereket Engida
54d8e97324 docs: update jwt callout notice 2025-04-09 07:06:30 +03:00
Jason Lei
8263382b92 feat(stripe): restore subscription (#1705)
* feat: restore stripe subscription

* documentation

* cleanup

* linting

* add subscriptionId as optional parameter
2025-04-08 20:57:37 +03:00
Bereket Engida
155d9486ae feat: one-time token plugin (#2151) 2025-04-08 20:50:13 +03:00
KinfeMichael Tariku
48efd6ad1f feat(provider): twitter email support (#2176) 2025-04-08 20:20:37 +03:00
Kinfe123
bfdb2e5237 fix: plugin middleware docs 2025-04-08 20:00:34 +03:00
Diogo Gaspar
dd9daa04a8 docs(stripe): Added annual: true on the Create Subscription (#1725)
* Added `annual: true` on the Create Subscription on Stripe Docs

* docs: clarify comment for annual plan upgrade in Stripe integration
2025-04-07 01:35:29 +03:00
Bereket Engida
a2296a0502 docs: simplify optimization guide 2025-04-05 21:24:48 +03:00
Bereket Engida
18744b04ba docs: remove unecessary details about db indexes 2025-04-05 21:22:00 +03:00
Bereket Engida
5584584c61 docs(reddit): apply correct scope property 2025-04-05 13:31:37 +03:00
Maxwell
016428ec68 docs(fix): rate-limit schema has two primary keys (#2122)
The field `key` shouldn't be the primary key, only `id`.
2025-04-04 19:35:54 +03:00