mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-16 08:26:43 +03:00
sso: polyfill buffer for browser
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import "@/lib/polyfills/buffer";
|
||||
import { createAuthClient } from "better-auth/react";
|
||||
import { oidcClient } from "better-auth/client/plugins";
|
||||
import { ssoClient } from "@better-auth/sso/client";
|
||||
@@ -60,4 +61,4 @@ export type Session = BetterAuthSession & {
|
||||
};
|
||||
export type AuthUser = BetterAuthUser & {
|
||||
username?: string | null;
|
||||
};
|
||||
};
|
||||
|
||||
5
src/lib/polyfills/buffer.ts
Normal file
5
src/lib/polyfills/buffer.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Buffer } from "buffer";
|
||||
|
||||
if (typeof globalThis !== "undefined" && (globalThis as any).Buffer === undefined) {
|
||||
(globalThis as any).Buffer = Buffer;
|
||||
}
|
||||
Reference in New Issue
Block a user