Skip to content

fix(auth): ensure getValue is properly awaited#48

Merged
Bekacru merged 1 commit intobetter-auth:mainfrom
nktnet1:fix-auth-missing-await
Jul 20, 2025
Merged

fix(auth): ensure getValue is properly awaited#48
Bekacru merged 1 commit intobetter-auth:mainfrom
nktnet1:fix-auth-missing-await

Conversation

@nktnet1
Copy link
Contributor

@nktnet1 nktnet1 commented Jun 24, 2025

Basic auth and custom auth does not work.

Turns out the getValue function in auth.ts is not awaited. This means that, for example in basic auth, what's being sent is the base64 encoded version of

[object Promise]:[object Promise] 

instead of

username:password 
@vercel
Copy link

vercel bot commented Jun 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
better-fetch-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 3:53am
@nktnet1
Copy link
Contributor Author

nktnet1 commented Jun 24, 2025

Just saw @hisyamnasir's #47 (checked opened issues but didn't check PRs so I missed this).

My version runs them in parallel though, so will keep open as an alternative fix - just adding a note on duplicate.

@Bekacru Bekacru merged commit 0c81362 into better-auth:main Jul 20, 2025
4 checks passed
@eluce2 eluce2 mentioned this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants