GithubHelp home page GithubHelp logo

da8y01 / auth-client-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krpeacock/auth-client-demo

0.0 0.0 0.0 2.39 MB

Example demo of how to use https://www.npmjs.com/package/@dfinity/auth-client to make authenticated calls to an IC app

Home Page: https://vasb2-4yaaa-aaaab-qadoa-cai.ic0.app/

JavaScript 44.22% TypeScript 5.92% CSS 42.11% HTML 3.33% Vue 2.44% Svelte 1.84% Motoko 0.13%

auth-client-demo's Introduction

Auth-Client Demo

This is an example project, intended to demonstrate how an app developer might integrate with an Internet Identity.

For a non-typescript implementation, see https://github.com/krpeacock/auth-client-demo/tree/vanilla-js

Live demo

This is an example showing how to use @dfinity/auth-client.

Setting up for local development

To get started, start a local dfx development environment in this directory with the following steps:

cd auth-client-demo/
dfx start --background --clean
dfx deps deploy
dfx deploy

Once deployed, start the development server with npm start.

You can now access the app at http://127.0.0.1:5173/.

Multiple Versions

This demo has multiple versions, each of which demonstrates a different feature of the auth-client. npm start will run the vanilla JS version, but you can run the others by running npm run start:version where version is one of the following:

  • React
  • Vue
  • Vanilla
  • Svelte

Pulling Internet Identity into your own project

To pull Internet Identity into your own project, you'll need to do the following:

  1. Add Internet Identity to your dfx.json file:
"internet-identity" : {
    "type": "pull",
    "id": "rdmx6-jaaaa-aaaaa-aaadq-cai"
}
  1. Run the following commands to install the dependencies:
dfx deps pull
dfx deps init --argument '(null)' internet-identity
dfx deps deploy

auth-client-demo's People

Contributors

krpeacock avatar peterpeterparker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.