ui-auth

A component to simplify the next generation of web3.storage Auth.

Simple UCAN based authentication. Includes registration and email verification, key creation and secure storage, as well as tools to switch between accounts and delegate abilities to other parties allowing you to build multi-tenant apps that allow your users to upload data to web3.storage without registration or a shared API key!

Supported frameworks: React

Simple Registration

UCAN based registration and email verification is fast and easy even for switching accounts

Secure Account Delegation

Secure key creation and storage allows you to build multi-tenant apps without a shared API key

import React from 'react'
import { Authenticator, useAuthenticator } from '@w3ui/react'

export default function Component() {
  const [{ submitted }] = useAuthenticator()
  return (
    <Authenticator.Form>
      <div>
        <label htmlFor='authenticator-email'>Email</label>
        <Authenticator.EmailInput id='authenticator-email' required />
      </div>
      <button type='submit' disabled={submitted}>
        Authorize
      </button>
    </Authenticator.Form>
  )
}