|
Hey guys, I've been looking at deno desktop for a project and was wondering what intergraton with better auth especially the oauth flows would loo like. |
Replies: 1 comment
|
The Better Auth server can run in Deno, but There is also an important Deno Desktop limitation at the moment. You can register a scheme in {
"desktop": {
"app": {
"deepLinks": ["com.example.app"]
}
}
}However, current Deno For now I would keep Better Auth on a normal web backend and use a system-browser authorization flow with PKCE and state. The return path needs to be either:
The Electron server plugin/proxy flow may be reusable conceptually, but the Deno app side still needs a small native client implementation for browser launch, PKCE state, code exchange, and secure token storage. Do not embed an OAuth client secret in the desktop binary. Once Deno exposes the pending |
The Better Auth server can run in Deno, but
@better-auth/electronis not a drop-in Deno Desktop client. Its client/main/preload pieces import Electron and provide Electron-specific protocol registration, IPC, secure storage, and browser launching.There is also an important Deno Desktop limitation at the moment. You can register a scheme in
deno.json:{ "desktop": { "app": { "deepLinks": ["com.example.app"] } } }However, current Deno
mainonly writes the OS registration metadata. The implementation explicitly says that delivering the opened URL to the running app, single-instance forwarding, and the JavaScriptopen-urlevent are tracked separately:cli/tools/desktop.rs.…