0.0.30 • Published 10 months ago

@risc0/zkauth v0.0.30

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

zkAuth

In order to implement this flow you need to:

  1. Ask us to add your domain to the list of allowed redirects (Google, Twitch, Facebook,etc)
  2. Integrate the following code to your project:
React Example:

1. Install

bun install @risc0/zkauth

2. For local development, make sure you are using port 3000

3. Usage

import "@risc0/zkauth/style.css"; // load the zkAuth stylesheet
import { ZkAuth } from "@risc0/zkauth";

function App() {
  return (
    <>
      <h1>My App</h1>
      
      <ZkAuth 
        address="0xc8915cc592583036e18724b6a7cBE9685f49FC98" // address to prove ownership of
        onStarkComplete={(starkResults) => {
          console.info("Stark completed:", starkResults);
        }}
        onSnarkComplete={(snarkResults) => {
          console.info("Snark completed:", snarkResults);
        }}
      />
    </>
  );
}

Note: if you are using Next.js, you need to mark the page as a client component with "use client".


Unsupported providers

  • LinkedIn (no way to pass a nonce)
  • PayPal (no way to pass a nonce)
  • Discord (doesn't support OIDC)
  • Twitter/X (doesn't support OIDC)
0.0.30

10 months ago

0.0.29

10 months ago

0.0.28

10 months ago

0.0.27

10 months ago

0.0.26

10 months ago

0.0.25

10 months ago

0.0.24

10 months ago

0.0.23

10 months ago

0.0.22

10 months ago

0.0.21

10 months ago

0.0.20

10 months ago

0.0.19

10 months ago

0.0.18

10 months ago

0.0.17

10 months ago

0.0.16

10 months ago

0.0.15

10 months ago

0.0.14

10 months ago

0.0.13

10 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago