Skip to content

Commit

Permalink
wip: modify token auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Nov 5, 2024
1 parent 16fb05c commit 8833f18
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/app/hooks/use-dfns.ts
Original file line number Diff line number Diff line change
@@ -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() {

Check warning on line 4 in src/app/hooks/use-dfns.ts

View workflow job for this annotation

GitHub Actions / lint-eslint

Missing return type on function
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-6ao42-2e42m-9asohsp529h0sanm',
baseUrl: 'https://app.dfns.ninja',
signer: new WebAuthnSigner(),
});

// const { token } = await dfnsAuth.login({
// username: 'us-12nks-o4ogd-943qhq5l5020410m',
// 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(

Check warning on line 22 in src/app/hooks/use-dfns.ts

View workflow job for this annotation

GitHub Actions / lint-eslint

Unexpected console statement
'tokeEEEEEEEEEEEEEEEEEEEEEEEEEEnEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE',
token
);
}
return {
authenticateUser,
Expand Down

0 comments on commit 8833f18

Please sign in to comment.