Request: Update to jose ^6 #1838

Closed
opened 2026-03-13 09:07:14 -05:00 by GiteaMirror · 7 comments
Owner

Originally created by @kevcube on GitHub (Sep 4, 2025).

Is this suited for github?

  • Yes, this is suited for github

I'm trying to use some better-auth features in a react-native application, and I'm experiencing problems because of usage of jose 5.10.0, which depends on node:crypto.

As of jose 6, the webcryptoAPI is used, which would make everything more portable.

Describe the solution you'd like

update to Jose ^6

Describe alternatives you've considered

dependency overrides

Additional context

No response

Originally created by @kevcube on GitHub (Sep 4, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. I'm trying to use some better-auth features in a react-native application, and I'm experiencing problems because of usage of jose 5.10.0, which depends on node:crypto. As of jose 6, the webcryptoAPI is used, which would make everything more portable. ### Describe the solution you'd like update to Jose ^6 ### Describe alternatives you've considered dependency overrides ### Additional context _No response_
GiteaMirror added the dependencies label 2026-03-13 09:07:14 -05:00
Author
Owner

@varshithmee commented on GitHub (Sep 4, 2025):

my app cant run because "subtle is undefined" error and I traced it to jose importing node:crypto.

edit: It is an expo app

@varshithmee commented on GitHub (Sep 4, 2025): my app cant run because "subtle is undefined" error and I traced it to jose importing node:crypto. edit: It is an expo app
Author
Owner

@kevcube commented on GitHub (Sep 4, 2025):

@varshithmee I'm still testing this. a fix for now is to override to jose 6 and use import 'react-native-webcrypto' at the top level of your app.

@kevcube commented on GitHub (Sep 4, 2025): @varshithmee I'm still testing this. a fix for now is to override to jose 6 and use `import 'react-native-webcrypto'` at the top level of your app.
Author
Owner

@varshithmee commented on GitHub (Sep 4, 2025):

@varshithmee I'm still testing this. a fix for now is to override to jose 6 and use import 'react-native-webcrypto' at the top level of your app.

How do you do that?

@varshithmee commented on GitHub (Sep 4, 2025): > [@varshithmee](https://github.com/varshithmee) I'm still testing this. a fix for now is to override to jose 6 and use `import 'react-native-webcrypto'` at the top level of your app. How do you do that?
Author
Owner

@kevcube commented on GitHub (Sep 4, 2025):

@varshithmee in package.json add

  "overrides": {
    "jose": "^6.0.0"
  },

install react-native-webcrypto and import it before activating any better-auth plugins.

@kevcube commented on GitHub (Sep 4, 2025): @varshithmee in package.json add ``` "overrides": { "jose": "^6.0.0" }, ``` install `react-native-webcrypto` and import it before activating any better-auth plugins.
Author
Owner

@varshithmee commented on GitHub (Sep 4, 2025):

@varshithmee in package.json add

  "overrides": {
    "jose": "^6.0.0"
  },

install react-native-webcrypto and import it before activating any better-auth plugins.

Thannks a lot! Will try as soon as possible !

@varshithmee commented on GitHub (Sep 4, 2025): > @varshithmee in package.json add > ``` > "overrides": { > "jose": "^6.0.0" > }, > ``` > > install `react-native-webcrypto` and import it before activating any better-auth plugins. Thannks a lot! Will try as soon as possible !
Author
Owner

@himself65 commented on GitHub (Sep 12, 2025):

my app cant run because "subtle is undefined" error and I traced it to jose importing node:crypto.

edit: It is an expo app

hi can you try v1.3.10-beta.4

@himself65 commented on GitHub (Sep 12, 2025): > my app cant run because "subtle is undefined" error and I traced it to jose importing node:crypto. > > edit: It is an expo app hi can you try v1.3.10-beta.4
Author
Owner

@melv-n commented on GitHub (Sep 14, 2025):

my app cant run because "subtle is undefined" error and I traced it to jose importing node:crypto.
edit: It is an expo app

hi can you try v1.3.10-beta.4

It removed some errors, but still getting:

TypeError: Cannot read property 'subtle' of undefined

originating from the 'better-auth/client/plugins' import.

It does work with importing react-native-webcrypto before the plugins, however.

@melv-n commented on GitHub (Sep 14, 2025): > > my app cant run because "subtle is undefined" error and I traced it to jose importing node:crypto. > > edit: It is an expo app > > hi can you try v1.3.10-beta.4 It removed some errors, but still getting: > TypeError: Cannot read property 'subtle' of undefined originating from the `'better-auth/client/plugins'` import. It does work with importing `react-native-webcrypto` before the plugins, however.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#1838