mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-22 15:59:56 -05:00
8 lines
231 B
TypeScript
8 lines
231 B
TypeScript
import type { PasskeyOptions } from "./types";
|
|
|
|
export function getRpID(options: PasskeyOptions, baseURL?: string | undefined) {
|
|
return (
|
|
options.rpID || (baseURL ? new URL(baseURL).hostname : "localhost") // default rpID
|
|
);
|
|
}
|