Skip to content

Commit

Permalink
wip: auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Nov 5, 2024
1 parent 058d4c7 commit 16fb05c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion netlify/functions/get-dfns-auth-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
});

Expand Down
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);

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

View workflow job for this annotation

GitHub Actions / lint-eslint

Unexpected console statement
// const dfnsAuth = new DfnsAuthenticator({
// appId: 'ap-7pvrc-mei7e-9u3pfedu9tidiq6p',
// baseUrl: 'https://app.dfns.ninja/',
// signer: new WebAuthnSigner(),
// });

const { token } = await dfnsAuth.login({
username: '[email protected]',
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,
Expand Down

0 comments on commit 16fb05c

Please sign in to comment.