Commit Graph

806 Commits

Author SHA1 Message Date
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
Bereket Engida
9909443bb4 docs(rate-limit): add warning about server-side rate limit 2025-04-04 18:33:23 +03:00
Bereket Engida
bcc17b96a0 docs(tanstack): update code block for API route example and fix syntax spacing 2025-04-04 15:57:58 +03:00
Bereket Engida
ba83da0f08 docs(drizzle): add drizzle-kit generate command 2025-04-04 15:54:54 +03:00
Bereket Engida
d1c86b0b24 docs: update rate limit schema 2025-04-04 13:10:43 +03:00
KinfeMichael Tariku
1116638cc4 fix: docs syntax spacing
docs: fix syntax spacing
2025-04-04 06:47:40 +03:00
Maxwell
a783cd14cb docs(fix): contributing docs had invalid links (#2103) 2025-04-03 21:24:15 +03:00
Thejana Weththasinghe
20aa26ab7c docs: fix syntax spacing 2025-04-03 18:58:50 +05:30
Alexander Cato
214c24bfdf docs: fix grammatical errors in admin plugin (#2081)
* docs: fix grammatical errors in admin.mdx

* docs: correct possessive form in admin.mdx
2025-04-02 14:10:51 +03:00
Netrifier
df72736d36 feat(admin): Add support for passing multiple roles as array (#1907)
* feat: add support for passing multiple roles as array

* docs(admin): update docs

* fix(admin): Fix admin role types not referenced correctly when custom roles are not passed

* test(admin): add test for multiple roles

* fix(admin): Fix duplicate exports of InferRolesFromOption and parseRoles from admin and organization plugin
2025-04-01 20:24:02 +03:00
KinfeMichael Tariku
673bdee66b chore: env variable consistency for social providers docs
fix(docs): Add missing "as string" to env variables
2025-04-01 12:09:11 +03:00
KinfeMichael Tariku
06b557b999 unwanted white space 2025-04-01 10:03:03 +03:00
KinfeMichael Tariku
9b698ecca2 Merge branch 'main' into patch-1 2025-04-01 10:01:32 +03:00
KinfeMichael Tariku
5f5fb8ddf5 chore: enable option on ratelimit docs
Update rate-limit.mdx
2025-04-01 09:50:26 +03:00
KinfeMichael Tariku
0d7fa1f99c chore: import orders and alias to avoid conflict in ac code examples
fix: import orders and alias to avoid conflict in ac code examples
2025-03-31 15:52:28 +03:00
Bereket Engida
cad6470b87 docs: fix incorrect field labels and remove database tables container 2025-03-31 07:26:18 +03:00
Bereket Engida
07d44db4d0 docs(strupe): add query param in for list sub referenceId 2025-03-31 00:08:31 +03:00
Daniel Worku
2bf10ab6b0 docs(supabase-migration): add non-null assertion operator on env variables (#2044) 2025-03-29 08:27:52 +03:00
Bereket Engida
f2cb6f511e docs: remove useSescureCookies config mention from getSessionCookies 2025-03-29 07:43:09 +03:00
Jason
26a045e250 docs: fix import in tanstack(#2029) 2025-03-28 10:58:03 +03:00
Bereket Engida
e436411189 chore: remove deprecated contribution guide 2025-03-27 20:09:53 +03:00
Nicholas Groters
1acf9ebaa0 docs: Add productionURL to OAuth Proxy options (#1943) 2025-03-27 08:42:30 +03:00
KinfeMichael Tariku
06193a3b63 feat: refresh token endpoint (#1779) 2025-03-26 23:51:33 +03:00
Mighty Ali
ed7bc69447 docs: fix update ..all to ...all (#1762) 2025-03-26 23:50:34 +03:00
John Tanzer
1e775cb4d9 docs: add disable 2fa (#2013) 2025-03-26 22:16:32 +03:00
Ismail Sabet
e3377b4019 docs: remove userId and add email on organization indexed fields (#2011) 2025-03-26 19:31:49 +03:00
Bereket Engida
fee9d64ac2 docs: enforce base url (#1991)
* fix: enforce base url

* check options

* chore: fix base url docs

* refactor(init.test): remove test for missing baseURL error
2025-03-25 18:45:55 +03:00
Bereket Engida
25ad0de591 docs(jwt): update heading level for local JWKS example 2025-03-25 18:43:31 +03:00
Bereket Engida
e198731b03 docs(jwt): update JWKS handling in token validation example 2025-03-25 17:58:05 +03:00
Bereket Engida
ef173fa71a docs(jwt): clarify token usage example in JWT documentation 2025-03-25 17:56:04 +03:00
Bereket Engida
d5ae5b2def chore: fix typo 2025-03-25 17:55:14 +03:00