mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
18 lines
450 B
TypeScript
18 lines
450 B
TypeScript
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';
|
|
import { PASSKEY_TIMEOUT } from '../constants/auth';
|
|
|
|
/**
|
|
* Extracts common fields to identify the RP (relying party)
|
|
*/
|
|
export const getAuthenticatorOptions = () => {
|
|
const webAppBaseUrl = new URL(NEXT_PUBLIC_WEBAPP_URL());
|
|
const rpId = webAppBaseUrl.hostname;
|
|
|
|
return {
|
|
rpName: 'Documenso',
|
|
rpId,
|
|
origin: NEXT_PUBLIC_WEBAPP_URL(),
|
|
timeout: PASSKEY_TIMEOUT,
|
|
};
|
|
};
|