Commit Graph
2169 Commits
Author SHA1 Message Date
Bereket Engida 989214cff6 chore: fix active organization inferred type 2025-04-12 13:20:59 +03:00
KinfeMichael TarikuandGitHub 3f4af02165 fix: delete from session table when stopImpersonate called (#2230) 2025-04-12 12:36:18 +03:00
KinfeMichael TarikuandGitHub 911bb5f68b chore: change plugin interface middleware type (#2195) 2025-04-12 11:37:10 +03:00
Bereket EngidaandGitHub f9b9672e78 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
2025-04-12 08:25:10 +03:00
Wade FletcherandGitHub 61027362b4 chore: add oneTimeToken plugin to client barrel exports (#2224) 2025-04-12 07:51:13 +03:00
Bereket Engida b885f35091 chore: release v1.2.6-beta.12 2025-04-11 21:02:48 +03:00
Bereket Engida 9d753f2748 chore: add one-time token plugin to build configuration and package.json 2025-04-11 20:57:27 +03:00
Wade FletcherandGitHub b7c724b10d fix: missing export one time token plugin (#2222) 2025-04-11 20:53:44 +03:00
Bereket Engida 81ef1fbc49 chore: release v1.2.6-beta.11 2025-04-11 19:53:01 +03:00
Bereket EngidaandGitHub 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 EngidaandGitHub 0493746a4b feat(jwt): add sub claim and getSubject (#2194) 2025-04-11 14:06:20 +03:00
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
Bereket Engida 8643cb6d13 chore: release v1.2.6-beta.10 2025-04-11 13:53:16 +03:00
Bereket EngidaandGitHub 3b6598aa9f feat: delete token expiry configuration (#2138) 2025-04-11 13:52:00 +03:00
Bereket EngidaandGitHub a927461ae5 fix: ipAddress and userAgent missing on server authentication (#2121)
* fix: ipAddress and userAgent missing on server authentication

* update craeteSession to use headers

* chore: revert version
2025-04-11 13:51:30 +03:00
Mauricio SiuandGitHub 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 EngidaandGitHub c0f158f02a fix(apple): update responseType to include code and id_token (#2091)
* fix(apple): update responseType to include code and id_token

* fix: include user object from the authroization url
2025-04-11 13:11:53 +03:00
Bereket EngidaandGitHub 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 LyonandGitHub 6b22e08c2b feat(facebook): add support for business login using config ids (#1990) 2025-04-11 12:42:07 +03:00
Bereket EngidaandGitHub 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
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
Nelson SousaandGitHub 83b88983cd chore(docs-one-tap): strongly type context to 'signin', 'signup', or 'use' (#1980) 2025-04-11 12:27:30 +03:00
Bereket Engida 7987d55a39 fix(oauth-proxy): extend callback and sign-in path matchers to include /oauth2/callback and /sign-in/oauth2 2025-04-11 12:14:51 +03:00
Bereket Engida 917aca8913 chore: fix stripe test 2025-04-11 12:04:21 +03:00
Bereket Engida 08130d0ce6 fix(stripe): update referenceId in checkout session to use client_reference_id instead of metadata 2025-04-11 12:00:00 +03:00
Bereket Engida 4dd067cfb6 chore: release v1.2.6-beta.9 2025-04-11 11:37:32 +03:00
Bereket Engida b93b28028c chore: release v1.2.6-beta.8 2025-04-11 11:30:01 +03:00
b2deff51d7 fix(api-key): update rateLimitEnabled default to consider options (#1887)
* fix(api-key): update rateLimitEnabled default to consider options

* fix(api-key): refine rate limit handling to ensure default values are correctly applied

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 11:23:57 +03:00
27b407e466 feat: openapi spec update (#1699)
* feat: openapi spec update

* fix: syntax

---------

Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 11:06:05 +03:00
OscarandGitHub 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
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
Bereket Engida a42671a8e7 feat: support user data mapping in id token social sign-in 2025-04-11 10:19:13 +03:00
Bereket EngidaandGitHub 880a559546 feat(email-otp): support attempt numbers for email-otp (#2146) 2025-04-11 09:59:13 +03:00
Bereket Engida f912702601 chore: fix ci test script 2025-04-11 09:54:01 +03:00
Bereket Engida 341d9913e6 test: add phone number reset password attempt tests 2025-04-11 09:45:19 +03:00
Bereket Engida a5a5f19147 chore: test ci and phone number test fixes 2025-04-11 09:28:41 +03:00
Bereket EngidaandGitHub 5591e78bcb feat(phone-number): add number of attempts configuration (#2046) 2025-04-11 09:22:09 +03:00
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
Bereket Engida 413bd9a95d chore: lint 2025-04-10 22:30:06 +03:00
MaxwellandGitHub 9efcd56f33 fix(stripe): Throw err if passed referenceId when no subscription authorizeReference` is defined (#2129)
* fix(stripe): Throw err if passed `referenceId` when no `subscription.authorizeReference` is defined

* fix: typo
2025-04-10 22:13:22 +03:00
Bereket Engida dea6f55493 chore: release v1.2.6-beta.7 2025-04-10 07:46:29 +03:00
Bereket Engida a7492f681d chore: remove uncessary error object key 2025-04-10 07:46:23 +03:00
Bereket EngidaandGitHub 06ddd9121e feat(react-start): add react-start integration for cookie handling (#2119) 2025-04-10 07:45:55 +03:00
Bereket Engida 01216a43d7 docs: update jwt callout notice 2025-04-09 07:06:22 +03:00
Bereket Engida ba5120a50b chore:lint 2025-04-08 21:01:37 +03:00
Özgür ÖZALPandGitHub cbbd650efa fix: improve header value retrieval for IP address extraction (#1865) 2025-04-08 20:58:16 +03:00
Jason LeiandGitHub 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 EngidaandGitHub 155d9486ae feat: one-time token plugin (#2151) 2025-04-08 20:50:13 +03:00
KinfeMichael TarikuandGitHub 48efd6ad1f feat(provider): twitter email support (#2176) 2025-04-08 20:20:37 +03:00
72631554e5 fix(organization): updateMemberRole failing if issuer has multiple roles (#2104)
* fix(organization): updateMemberRole failing if issuer has multiple roles

* refactor: centralize permission checks using hasPermission utility in admin and organization plugins

* chore: cleaup

* chore: lint

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-07 11:12:38 +03:00