Skip to content

Commit

Permalink
Merge pull request #6 from Web3Auth/update-readme
Browse files Browse the repository at this point in the history
Update README
  • Loading branch information
chaitanyapotti authored Jan 26, 2023
2 parents 6b90f62 + af7e351 commit f603ef3
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 136 deletions.
75 changes: 38 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
# web3auth-unity-sdk
# Web3Auth Unity SDK

[![](https://jitpack.io/v/org.torusresearch/web3auth-unity-sdk.svg)](https://jitpack.io/#org.torusresearch/web3auth-unity-sdk)

Web3Auth SDK for Unity3D game engine which supports Android, iOS, and Windows. `web3auth-unity-sdk` is a client-side library which allows you to authenticate users using
[Web3Auth](https://web3auth.io/) on Unity3D game engine.
Web3Auth is where passwordless auth meets non-custodial key infrastructure for Web3 apps and wallets. By aggregating OAuth (Google, Twitter, Discord) logins, different wallets and innovative Multi Party Computation (MPC) - Web3Auth provides a seamless login experience to every user on your application.

## Requirements
## 📖 Documentation

Checkout the official [Web3Auth Documentation](https://web3auth.io/docs) and [SDK Reference](https://web3auth.io/docs/sdk/unity/) to get started!

## 💡 Features
- Plug and Play, OAuth based Web3 Authentication Service
- Fully decentralized, non-custodial key infrastructure
- End to end Whitelabelable solution
- Threshold Cryptography based Key Reconstruction
- Multi Factor Authentication Setup & Recovery (Includes password, backup phrase, device factor editing/deletion etc)
- Support for WebAuthn & Passwordless Login
- Support for connecting to multiple wallets
- DApp Active Session Management

...and a lot more

## ⏪ Requirements

- Unity Editor 2019.4.9f1 or greater
- .Net Framework 4.x

## Installation
## Installation

Download [.unitypackage](https://github.com/Web3Auth/web3auth-unity-sdk/releases/tag/Web3Auth-Unity-SDK) and import the package file into your existing Unity3D project.
Download [.unitypackage](https://github.com/Web3Auth/web3auth-unity-sdk/releases/latest) and import the package file into your existing Unity3D project.

> You may encounter errors when importing this package into your existing project.
> `The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)`
Expand All @@ -24,7 +39,7 @@ Download [.unitypackage](https://github.com/Web3Auth/web3auth-unity-sdk/releases

![Json Dot Net Error](./Images/JsonDotNet%20Error.png)

## Building in Unity and Get Started
## 🌟 Configuration

To get started, open a sample scene `Web3AuthSample` inside `Assets/Plugins/Web3AuthSDK/Samples/Web3AuthSample.scene`

Expand All @@ -35,8 +50,6 @@ Before building the application for Android/IOS you need to register the redirec
- Enter the redirect_url _(i-e torusapp://com.torus.Web3AuthUnity/auth)_ and click generate.
> To use your own client_id , register your app on [https://web3auth.io/](https://web3auth.io/) and replace the client_id inside `Assets/Plugins/Web3AuthSDK/Samples/Web3AuthSample.cs` script.
## Integration

### Configure an Web3Auth project

Go to [Developer Dashboard](https://dashboard.web3auth.io/), create or select an Web3Auth project:
Expand All @@ -45,7 +58,7 @@ Go to [Developer Dashboard](https://dashboard.web3auth.io/), create or select an
_i-e torusapp://com.torus.Web3AuthUnity/auth_
- Copy the Project ID for later usage as client_id

## Intialize Web3Auth
## 💥 Initialization & Usage

In your sign-in script', create an Web3Auth instance with your Web3Auth project's configurations and configure it like this:

Expand Down Expand Up @@ -84,31 +97,19 @@ Web3Auth Unity SDK provides a tool to simulate the redirect callback. To open go

![Deep Link Debug](./Images/Deep%20Link%20Debug.png)

## API Reference

```csharp
class Web3Auth {
Web3Auth(Web3AuthOptions web3AuthOptions) {}
// Trigger login flow that shows a modal for user to select one of supported
// providers to login, e.g. Google, Facebook, Twitter, Passwordless, etc
void login() {}
// Trigger login flow using login params. Specific Login Provider can be set
// through Login Params
void login(LoginParams loginParams) {}
}
class Web3AuthOptions {
string clientId; // Your Web3Auth project ID
public Web3Auth.Network network; // Network to run Web3Auth, either MAINNET or TESTNET
public Uri redirectUrl; // URL that Web3Auth will redirect API responses
public WhiteLabelData whiteLabel; // Optional param to configure look
public Dictionary<string, LoginConfigItem> loginConfig; // Optional
}
public class LoginParams {
public Provider loginProvider;
public string dappShare;
public ExtraLoginOptions;
public Uri redirectUrl;
public string appState;
public MFALevel mfaLevel;
}
```
## 🩹 Examples

Checkout the examples for your preferred blockchain and platform in our [examples repository](https://github.com/Web3Auth/examples/)

## 🌐 Demo

Checkout the [Web3Auth Demo](https://demo-app.web3auth.io/) to see how Web3Auth can be used in an application.

Further checkout the [samples folder in the Web3Auth SDK](https://github.com/Web3Auth/web3auth-unity-sdk/tree/master/Assets/Plugins/Web3AuthSDK/Samples) within this repository, which contains a sample app.

## 💬 Troubleshooting and Discussions

- Have a look at our [GitHub Discussions](https://github.com/Web3Auth/Web3Auth/discussions?discussions_q=sort%3Atop) to see if anyone has any questions or issues you might be having.
- Checkout our [Troubleshooting Documentation Page](https://web3auth.io/docs/troubleshooting) to know the common issues and solutions
- Join our [Discord](https://discord.gg/web3auth) to join our community and get private integration support or help with your integration.
99 changes: 0 additions & 99 deletions Using Auth0 with Web3Auth.md

This file was deleted.

0 comments on commit f603ef3

Please sign in to comment.