diff --git a/netlify/functions/get-dfns-auth-token.ts b/netlify/functions/get-dfns-auth-token.ts index a54511b6..5a62836f 100644 --- a/netlify/functions/get-dfns-auth-token.ts +++ b/netlify/functions/get-dfns-auth-token.ts @@ -11,7 +11,7 @@ const handler: Handler = async event => { }); const { token } = await dfnsAuth.login({ - username: 'us--o4ogd-943qhq5l5020410m', + username: 'us-12nks-o4ogd-943qhq5l5020410m', orgId: 'or-4bcun-fj3tb-8np9ivfu5jnstkks', }); diff --git a/src/app/hooks/use-dfns.ts b/src/app/hooks/use-dfns.ts index 85ea5045..b55e1671 100644 --- a/src/app/hooks/use-dfns.ts +++ b/src/app/hooks/use-dfns.ts @@ -1,28 +1,28 @@ -import { DfnsAuthenticator } from '@dfns/sdk'; -import { WebAuthnSigner } from '@dfns/sdk-browser'; +// import { DfnsAuthenticator } from '@dfns/sdk'; +// import { WebAuthnSigner } from '@dfns/sdk-browser'; export function useDFNS() { async function authenticateUser() { - // const netlifyFunctionEndpoint = `/.netlify/functions/get-dfns-auth-token`; + const netlifyFunctionEndpoint = `/.netlify/functions/get-dfns-auth-token`; - // const response = await fetch(netlifyFunctionEndpoint); + const response = await fetch(netlifyFunctionEndpoint); - // console.log('response', response); - const dfnsAuth = new DfnsAuthenticator({ - appId: 'ap-7pvrc-mei7e-9u3pfedu9tidiq6p', - baseUrl: 'https://app.dfns.ninja/', - signer: new WebAuthnSigner(), - }); + console.log('response', response); + // const dfnsAuth = new DfnsAuthenticator({ + // appId: 'ap-7pvrc-mei7e-9u3pfedu9tidiq6p', + // baseUrl: 'https://app.dfns.ninja/', + // signer: new WebAuthnSigner(), + // }); - const { token } = await dfnsAuth.login({ - username: 'dani@dlc.link', - orgId: 'or-4bcun-fj3tb-8np9ivfu5jnstkks', - }); + // const { token } = await dfnsAuth.login({ + // username: 'us-12nks-o4ogd-943qhq5l5020410m', + // orgId: 'or-4bcun-fj3tb-8np9ivfu5jnstkks', + // }); - console.log( - 'tokeEEEEEEEEEEEEEEEEEEEEEEEEEEnEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE', - token - ); + // console.log( + // 'tokeEEEEEEEEEEEEEEEEEEEEEEEEEEnEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE', + // token + // ); } return { authenticateUser,