Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

A demo application to showcase how to use Realm, Atlas and WebAuthn package to fingerprint authenticate users on websites

License

Notifications You must be signed in to change notification settings

mongodb-developer/atlas-app-webauthn-fingerprint-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Notice: Repository Deprecation

This repository is deprecated and no longer actively maintained. It contains outdated code examples or practices that do not align with current MongoDB best practices. While the repository remains accessible for reference purposes, we strongly discourage its use in production environments. Users should be aware that this repository will not receive any further updates, bug fixes, or security patches. This code may expose you to security vulnerabilities, compatibility issues with current MongoDB versions, and potential performance problems. Any implementation based on this repository is at the user's own risk. For up-to-date resources, please refer to the MongoDB Developer Center.

Atlas-webauthn-fingerprint-auth

A demo application to showcase how to use Atlas App Services, Atlas and WebAuthn package to fingerprint authenticate users on websites

Require a finger print reader device on the running demo host. Tested on Chrome web browser.

Prerequisite

  • Create an Atlas cluster
  • Enable DATA API
  • Create app services application, find its APP ID..
  • Enable function auth on the created app with the follwing function:
 exports = async (loginPayload) => {
 

    const user = await context.services.get("mongodb-atlas").db("sample_webauthn").collection("users").findOne({id : loginPayload.username});
    return user.authenticator.credID;


  };

Install

cd realm-webauthn-fingerprint-auth/example
npm install

Create the .env file in the main project with the Atlas DATA API details and allowed origin URL details:

DATA_API_KEY=<API-KEY>
DATA_API_BASE_URL=<DATA-API-BASE-URL>
CLUSTER_NAME=<CLUSTER-NAME>
APP_ID=<APP-SERVICES-APP-ID>
ORIGIN=http://localhost:3001

Run development

npm build & npm run dev-server

Website is on http://localhost:3001

Disclaimer

Use at your own risk; not a supported MongoDB product

About

A demo application to showcase how to use Realm, Atlas and WebAuthn package to fingerprint authenticate users on websites

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published